Does anyone has some ideas or tips for improving magento2's performance on localhost taking into consideration that you are working without cache and other stuff that helps the loading speed.

How much do you think it affects the OS in this matter ? (Windows vs Linux vs OS X)

Thank you


Maximum performance you gets definitely on Linux. OS X also good enough (except case insensitive file system by default). I don't recommend use Windows. Is not supported for Magento and require use virtualization for proper work.

  • I never run compiler and static deploy scripts!!!

  • I use Macbook Pro as Developer computer.

  • I setup Magento in vagrant (on ubuntu) with 2G memory and use NFS for file sharing.
  • I use developer mode.
  • I always enable all caches (except when a start modify the layout. than I disable FP, Blocks, and Layout cache).
  • I use PHP7 with opcache (configured to recheck files every second) and enable xdebug extension only if need to debug (iI have the script that fully enable/disable extension in php, not just debugging - it's improve performance in 3-5 times!!!).
  • I use APCLite for cache adapter

@Dragos, I've ran into the same problem. I'm on a Macbook Pro with: 16GB RAM, 2.8Ghz i7 cpu, and SSD. I have noticed that when I spin up an AWS EC2 instance with roughly the same specs, an M2 installation is much faster. The EC2 instance also wasn't running all the local processes that I was. Last time I checked, 750MB was the minimum suggested RAM to be allocated to an instance. For local development:

  1. Make sure you have enough free RAM for M2 to run
  2. Try using Less.js, instead of having Magento transpile your Less (in developer mode)
  3. When in developer mode, deploy your static content up front, and then only delete the files related to what you've modified (so that your changes will be reflected upon page load. If you deploy static content up front, but do not then delete the corresponding generated file, you will not see your changes reflected).
  4. For my setup, I use Docker and have configured Zend OpCache for Php, and I use Varnish (obviously clearing of cache is required to see changes reflected, but I got tired of the slow local speed. YMMV).

I hope these ideas help.

  • To minimize memory usage disable PERFORMANCE_SHEME in MySql. (it's - 200M)
    – KAndy
    Jun 8 '16 at 17:12
  • Newer deploy static file in development mode!!!
    – KAndy
    Jun 8 '16 at 17:14
  • @KAndy: In development mode, deploying static files just creates all of the symlinks up front, instead of forcing each one to be created on-demand through a PHP request. It can save a lot of time.
    – Ryan Hoerr
    Jun 8 '16 at 17:23
  • @RyanH., no, deploy did file copy and when you change original file you need delete copied version. It is common mistake.
    – KAndy
    Jun 8 '16 at 17:28
  • @KAndy that's why I put "and then only delete the files related to what you've modified" meaning, delete the files that you've modified, so that the new files will be generated (so that you can see your changes reflected). If this portion of my answer was not present, then I would totally agree with you. Maybe I wasn't clear enough and assumed the OP understood my answer. My apologies.
    – ryanF
    Jun 8 '16 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.