-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme Development Extremely Slow #7859
Comments
This is actually a problem I've been experiencing as well. I've tried each of the available compilation methods, and the one that @duffner described above (deleting the cache files) seems to be the most efficient way to develop. Yet it becomes incredibly frustrating when every 3-second CSS change requires somewhere in excess of 30 seconds' worth of waiting. |
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/css-topics/css_debug.html Makes it less painful. |
If you are using a Vagrant and a mounted drive (specially on Windows) I'd recommend to put the Magento inside the virtual machine's disk space. The communication between Vagrant (guest) and host machine is extremely slow. I had the same issue with Docker. I moved the Magento files inside the container and I upload files from host to guest via PHPStorm sync functionality. The difference in speed is night and day. |
@jupiter01 -- My experience with using the built-in Grunt as described in that article is that Likewise, the files created with Since running |
I agree with @JTessmer, as this is what has been necessary in order to work effectively. @denchev, I am using vagrant within a virtual box run on a mac, and virtual machines disk is mounted within as you recommended. This same vagrant instance runs a fresh Magento 1 instance with cache disabled in .75 - 1.00 seconds. |
@magento-admin, who is assigned to this ticket? This is a major issue and makes Magento 2 extremely custom themes almost impossible due to extensive build time. |
@duffner just curious but if you're using macOS I would watch out for using |
Im lucky to have already solved that one a number of years back. I use grunt, less and custom theme generation as my custom functionality ontop of Magento 1. The only reason it's so slow is because of the dependency on PHP that Magento's build process has. I'd like to see Magento create a webinar or demo of proper front end development from the configuration and theme / project setup side. |
And to others comments while I like gulp better at this point. Grunt works awesome, when it's used with an application respectful of it. @magento. When are you solving this!!!!! |
What is the status of this issue. Development speed for a front-end developer is unacceptable. When is Magento planning to fix this? |
I will say it again since nobody seems to care about my previous comment. The speed of Magento 2 is largely based on the file system I/O. If you are using any sort of virtual machine and synced folders. No matter Vagrant or Docker. Just don't! I went from more than 2 minutes load time to less than 200ms when I moved from fully synced VM host-guest machine to only-sync-the-theme-or-extension-and-not-the-other-40000-files. The bottom line is: Magento is not slow. The OS and server setup has to be right. |
@denchev, I do care. :) Can you please explain your configuration in more detail? I'd love to learn a new way to do this... but I develop on a mac, the only alternative I have would be native NGNIX, PHP and MySQL on OSX. I'd consider this solved if there was documentation to support a 200ms approach to getting grunt to compile less and see my changes immediately. Additionally, I don't believe I have an IO problem... but I could be wrong.. Is there a way I could test my current configuration to prove your theory? |
@duffner Grunt is slow even in good days. I'm using a SASS based theme for Magento 2 and it comes with it's own GULP tools. You should check this project https://github.com/SnowdogApps/magento2-theme-blank-sass. It is working pretty good. |
@denchev, I understand Grunt is slow in comparison to GULP, however it's not Grunt's problem. It's the theme building itself. Again while I agree your referenced theme maybe a solution. It's still a Magento core problem. |
@duffner I would recommend you setup nginx, php and mysql using brew. It's not too difficult to do. Just install PHP 7.0 and enable opcache in php.ini and your good to go. I did run into an issue with a max file limit in OS X, but I solved that. With regards to everybody else on Mac.. I'm using a 13" MacBook Pro with an SSD from late 2013. I was thinking of getting a new machine simply because M2 is so slow for development. It's not so bad when you use grunt etc, but if your changing layouts and html output then it still is quite slow. Would anyone recommend a 13" or 15" 2016 model? I prefer the portability of the 13" over the 15" but I'm concerned the 13" is only a dual core. I'm also thinking about getting a Dell XPS 15. |
@duffner Have you read this article? https://magento.com/blog/technical/set-your-magento-2-development-environment-faster |
@denchev, I have not
Is this what you were referring to? |
@duffner More or less. The guys from Magento explained it better than me. I think Magento is build for Linux and all other OS (Windows, MacOS) needs to find a way to work around it. I use a virtual machine with Ubuntu. My Magento files are installed in the VM. Then I only expose the extension/theme files between host and guest machine. I have to keep another copy of Magento on my host machine just so my PHP Storm can work properly though. |
@denchev, thanks for the explanation. I'll give your approach a try and I'll document my findings |
@duffner, thank you for your report. |
Building a new theme within Magento 2 is extremely slow, with page load times exceeding 40 seconds when having to generate theme assets.
Preconditions
Steps to reproduce
Expected result
Actual result
This makes Magento 2 frontend development painful. While I feel that normally this would be a forum question, the reason it's a bug is for a few reasons: If there isn't a better way to do this, the speed is completely unacceptable, and two, if there is a better way to accomplish frontend styling there isn't documentation indicating otherwise which in itself is a bug.
The text was updated successfully, but these errors were encountered: