Tuesday, 15 September 2015

laravel - Optimize image loading iteration in php -


I have a larval application in which the user is presented with a list of episodes, with each screenshot. Each screenshot is loaded inside the loop loop in view according to this pseudo code:

  foreach $ episode $ episode $ episode-gt; GetScreenshot ($ APIIDID); Endorrock  

getScreenshot () method resolves a specific class screenshot locator to IoC :

$ screenshotLocator = App :: create ('\ Animekyun \ Images \ screenshot \ Screenshot Locator');

(I'm reading a few things about binding it in a container as a singleton. Is such a thing considered? It is currently not strictly prohibited)

Code> Screenshots Locator class is designed to create the path of the actual screenshot folder (source below) using the episode model. Screenshots (many per episode) are stored in all folder structure and the required file has been loaded and stored in a archive .

<100> 40 ms for loads of screenshots to load on a digital ocean droplet 135 ms (10x run benchmark )

So my question is, what are some ways to adapt it?

Screenshot locker for the category Source:


No comments:

Post a Comment