Web hosting
Publié le 30 Août 2016 à 05h59 - 1200 vues

Let's check your PHP script with us

Once your application works perfectly, you can try to optimize the execution time or memory consumption. However, take care not to go overboard. Before optimizing your php code you need to keep in mind 2 things:
- What takes the most time is not the PHP code but network access (BDD queries, web scraping) or disk (includes);
- An opcode cache tool can be charged optimize your PHP code for you (to some extent).

Some tips to reduce network access

- Minimize the number of requests you made to the relational database management system. This means avoiding queries in loops or unnecessary requests;
- Request only the bare minimum to the RDBMS when making a request. If you need a single column, SELECT * is avoided. When you want to count the number of lines, using COUNT (*);
- Avoid waste of memory using the least possible variables. Or do not create variables that contain the same as another.

Caching

Caching allows you not to execute new code that has already been executed recently.Take the example of a news site in which the home page has the latest news. Each visitor to the home page requires PHP to send an SQL query through the network, waiting for the response of the DBMS, retrieve data from the open socket for the occasion, treat and display. Knowing that the visits rate is very much higher than the frequency of updating the news, the vast majority of requests are redundant. These daily visits require PHP to unnecessarily perform summarized above treatments ... A caching solution could be to generate the complete HTML of the home page with each update of the database. Thus, no unnecessary query is sent to the DBMS. However, this technique is not reasonable for the entire site because of potential excessive amount of content to compile in advance. It is therefore necessary to resort to more subtle techniques, and it is here that the caching tools become interesting.

Let us have a look on the php code of your website and see what could be optimized with our php developers.

Les publications similaires de "Consulting"

  1. 14 Juil. 2017Free advices in development during our open day at the Agency !269 vues
  2. 23 Déc. 2016How to consult us for your web project?1822 vues
  3. 22 Nov. 2016How to faster your website ?1145 vues
  4. 2 Nov. 2016Consult our php experts841 vues
  5. 29 Oct. 2016Our agency specializes in the creation of php website848 vues
  6. 20 Sept. 2016Why do you have to forget about Javascript and just use php language instead ?1118 vues
  7. 15 Sept. 2016How to describe your website vision in a web design language ?1074 vues
  8. 25 Août 2016Need help to choose your code for your future website ? We are here !910 vues
  9. 28 Juil. 2016Offer an amazing trip to your team !916 vues
  10. 20 Juil. 2016How to reach customers with a great website ?885 vues
  11. 1 Avril 2016Les services proposés par une entreprise de domiciliation2323 vues
  12. 19 Déc. 2015Why Developers NEVER give a consulting ?8294 vues
  13. 8 Déc. 2015An audit from developers, how much it costs ?1292 vues