patentsite.blogg.se

Laravel blackfire
Laravel blackfire




  1. #Laravel blackfire upgrade#
  2. #Laravel blackfire code#

Use a CDN for assets such as images once they have been optimised. It can highlight slow DB queries, repeated queries etc. Use Chrome Dev tools to look at each route and determine if there any front end assets that need optimising or are blocking, large images etc.ĭebugbar us very helpful for this too.

laravel blackfire

Make use of Mailables, Requests to keep then lean and simple. Move as much data processing to the Model layer as possible. Follow the RESTful pattern as suggested in the docs for routes/controllers. You could use your basic suite as per point one, or write tests as you go. Disable lazy loading <- this is probably your memory problem, fix all the errors that this throws up. Eloquent is generally very good so make use of it and stop writing your own SQL unless you really need to (there are times when you have to of course). If you don't get this right you are pretty much screwed hence why I'd look at it first. I think I'd start again with a clean slate if things are really bad. These will be set to build the 'bad' DB, then make all the changes to the 'good' version. This is especially true if you are using migrations. But it may be worth rebuilding this from scratch. It sounds like some serious normalisation is required. Plus the upgrades themselves may highlight areas that you need to work on N+1 queries for example. This won't necessarily give you a massive direct speed boost (it will probably help a bit) but it will give you a better canvas to work from.

#Laravel blackfire upgrade#

Testing is a bit of an art and I don't claim to be an expert so you will likely find a range of opinions here.Ģ) Upgrade to the latest version of Laravel and other dependencies, including PHP. However, from the sound of it the amount of work you have to do may mean any comprehensive suite would need to be re-weiten anyways.

#Laravel blackfire code#

One of the main reasons to do testing at all is to allow you to refactor code with a safety net. You could build a complete tearing suite.

laravel blackfire

You don't need to go overboard at this point but testing all the main features so that you know you aren't breaking things too much as you progress will be helpful. I probably wouldn't bother doing that here until you have sorted everything obvious.

laravel blackfire

Performance problems are a real pain when it isn't clear what the problem is and something like Blackfire is needed to trace the code and find the bottleneck. Have to admit I'm slightly jealous as this process will be really satisfying.ġ) Identifying the biggest issues and planning your approach.įrom the sound of it basically everything can be done which is a great place to start.






Laravel blackfire