Magento 2 Performance – Magento 2 Running Slow on Localhost Development

developmentlocalhostmagento2performance

I recently started developing on magento2 new extensions or customizations, and my first impression was a nightmare. I have to wait about 20-30s for every change I make? really?

I'm talking about development mode, I know that in production with cache enabled and other things the website can be smooth. But when I'm working with an extension or layout problem I need to be removing static files, clearing cache, etc.

My question is, how you all M2 developers work? because I don't believe you have to wait 20s-30s for refreshing the page…

My environment: My pc is "good" i5 with 8gb RAM. I need to work with Windows so I use vagrant:

  • Use of all 4 cores CPU
  • Use 5120MB of RAM
  • Ubuntu/trusty64 – Ubuntu 14.04
  • PHP Version 7.0.12-1+deb.sury.org~trusty+1
  • MariaDB – 10.1.18-MariaDB-1~trusty
  • Magento 2.1.2 is installed only with sampledata (no more modules are installed)
  • (Ask me if you wanna know sth more)

What is happenning exactly?
Usually M2 responds okay, slow but okay, about 5-10s to load the pages, but sometimes (more usually than sometimes) it just stucks forever! sometimes is the first page and sometimes are the css,js,html files but always the problem is with TTFB.

I saw a problem going to setup wizard too… with angular.js these files lasts forever…

These 2 pictures are about navigating inside setup wizard.

http://imgur.com/Izoyuhj
http://imgur.com/Vs5q8eT

Then another one navigating on frontend catalog:
http://imgur.com/oXYC52D

What am I asking exactly?
Is this normal? you guys work with this timing? I commented this with some colleagues and we just don't believe, I have to be working like this? I sometimes despair of waiting all the time watching the screen…

If someone asks me for show him a test, like creating a new product or something like that he just freaks out… Creating a new order, filling the fields and every field executes a js that lasts for 5-6s…

I don't know but I feel so bad developing with this stuff…

Best Answer

I tried everything and the only thing it works is the virtual machine that provides bitnami. https://bitnami.com/stack/magento/virtual-machine

Seriously, I don't know what has this vm, but goes really fast. I tried creating my VM using a fresh installation of Ubuntu, CentOS, etc. But no works so fine like this VM.