Magento2 DI compilation takes too much time Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Magento compilation hangs!Magento2: How to create multiple storefrontsClassnames 'Void' inside vendor/magento/Magento 2.1 :- During compilation Fatal errorUsing a different PHP version to compile Magento projectCannot install module in Magento 2I need to install one Magento 2 themeMagento 2: Static files are present but shows 404magento 2 setup:static-content:deploy execution time errorMagento 2: How to deploy an image file on production site?How to find Circular dependency error in complete project of Magento 2

Why is "Consequences inflicted." not a sentence?

How widely used is the term Treppenwitz? Is it something that most Germans know?

Using audio cues to encourage good posture

Why do people hide their license plates in the EU?

Can I cast Passwall to drop an enemy into a 20-foot pit?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

Fundamental Solution of the Pell Equation

Output the ŋarâþ crîþ alphabet song without using (m)any letters

Coloring maths inside a tcolorbox

Should I use a zero-interest credit card for a large one-time purchase?

Is the Standard Deduction better than Itemized when both are the same amount?

Extract all GPU name, model and GPU ram

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

2001: A Space Odyssey's use of the song "Daisy Bell" (Bicycle Built for Two); life imitates art or vice-versa?

How do I stop a creek from eroding my steep embankment?

Can a non-EU citizen traveling with me come with me through the EU passport line?

What is a non-alternating simple group with big order, but relatively few conjugacy classes?

What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?

Why light coming from distant stars is not discreet?

Seeking colloquialism for “just because”

The logistics of corpse disposal

Why are Kinder Surprise Eggs illegal in the USA?

Echoing a tail command produces unexpected output?

How to tell that you are a giant?



Magento2 DI compilation takes too much time



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Magento compilation hangs!Magento2: How to create multiple storefrontsClassnames 'Void' inside vendor/magento/Magento 2.1 :- During compilation Fatal errorUsing a different PHP version to compile Magento projectCannot install module in Magento 2I need to install one Magento 2 themeMagento 2: Static files are present but shows 404magento 2 setup:static-content:deploy execution time errorMagento 2: How to deploy an image file on production site?How to find Circular dependency error in complete project of Magento 2



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








8















After creating/updating new module/theme, I use following command in root Magento installation directory



php bin/magento setup:upgrade


Which asks me to run compilation, so I use



 php bin/magento setup:di:compile


which takes around 8 minutes of time to compile it. Is there a way to fasten the compilation process?










share|improve this question

















  • 1





    I have reported it on GitHub 3 weeks ago: #2893.

    – Mage2.PRO
    Jan 28 '16 at 12:54

















8















After creating/updating new module/theme, I use following command in root Magento installation directory



php bin/magento setup:upgrade


Which asks me to run compilation, so I use



 php bin/magento setup:di:compile


which takes around 8 minutes of time to compile it. Is there a way to fasten the compilation process?










share|improve this question

















  • 1





    I have reported it on GitHub 3 weeks ago: #2893.

    – Mage2.PRO
    Jan 28 '16 at 12:54













8












8








8


4






After creating/updating new module/theme, I use following command in root Magento installation directory



php bin/magento setup:upgrade


Which asks me to run compilation, so I use



 php bin/magento setup:di:compile


which takes around 8 minutes of time to compile it. Is there a way to fasten the compilation process?










share|improve this question














After creating/updating new module/theme, I use following command in root Magento installation directory



php bin/magento setup:upgrade


Which asks me to run compilation, so I use



 php bin/magento setup:di:compile


which takes around 8 minutes of time to compile it. Is there a way to fasten the compilation process?







magento2 compilation






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 16 '16 at 5:29









amitshreeamitshree

3,282103883




3,282103883







  • 1





    I have reported it on GitHub 3 weeks ago: #2893.

    – Mage2.PRO
    Jan 28 '16 at 12:54












  • 1





    I have reported it on GitHub 3 weeks ago: #2893.

    – Mage2.PRO
    Jan 28 '16 at 12:54







1




1





I have reported it on GitHub 3 weeks ago: #2893.

– Mage2.PRO
Jan 28 '16 at 12:54





I have reported it on GitHub 3 weeks ago: #2893.

– Mage2.PRO
Jan 28 '16 at 12:54










1 Answer
1






active

oldest

votes


















9














First of all, compilation need only in production mode. If you develop, you do not need to run compilation



It's hard to improve compilation, because in this process build tree of all classes in system. For example change in 'di.xml' can affect half of classes.



In developer mode, if you modify/create constructor you still need to delete generated/code/ folder to remove auto generated code and cleanup cache






share|improve this answer

























  • So, I should ignore this message in developer mode?

    – amitshree
    Jan 16 '16 at 10:55











  • Yes, You should ignor

    – KAndy
    Jan 16 '16 at 12:35






  • 4





    Also, as soon you ran compilation once, there will be *.ser files in /var/di and you should delete them, otherwise they are still used.

    – Fabian Schmengler
    Mar 6 '16 at 12:52






  • 1





    even in developer mode, if create constructor or modify any of them, you still need to run setup:di:compile. maybe this is now required in latest magento version.

    – Doni Wibowo
    Oct 3 '17 at 13:57







  • 1





    DoniWibowo @Suman-PHP4U I updated the response about the code changes

    – KAndy
    Apr 12 at 16:21












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f97541%2fmagento2-di-compilation-takes-too-much-time%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









9














First of all, compilation need only in production mode. If you develop, you do not need to run compilation



It's hard to improve compilation, because in this process build tree of all classes in system. For example change in 'di.xml' can affect half of classes.



In developer mode, if you modify/create constructor you still need to delete generated/code/ folder to remove auto generated code and cleanup cache






share|improve this answer

























  • So, I should ignore this message in developer mode?

    – amitshree
    Jan 16 '16 at 10:55











  • Yes, You should ignor

    – KAndy
    Jan 16 '16 at 12:35






  • 4





    Also, as soon you ran compilation once, there will be *.ser files in /var/di and you should delete them, otherwise they are still used.

    – Fabian Schmengler
    Mar 6 '16 at 12:52






  • 1





    even in developer mode, if create constructor or modify any of them, you still need to run setup:di:compile. maybe this is now required in latest magento version.

    – Doni Wibowo
    Oct 3 '17 at 13:57







  • 1





    DoniWibowo @Suman-PHP4U I updated the response about the code changes

    – KAndy
    Apr 12 at 16:21
















9














First of all, compilation need only in production mode. If you develop, you do not need to run compilation



It's hard to improve compilation, because in this process build tree of all classes in system. For example change in 'di.xml' can affect half of classes.



In developer mode, if you modify/create constructor you still need to delete generated/code/ folder to remove auto generated code and cleanup cache






share|improve this answer

























  • So, I should ignore this message in developer mode?

    – amitshree
    Jan 16 '16 at 10:55











  • Yes, You should ignor

    – KAndy
    Jan 16 '16 at 12:35






  • 4





    Also, as soon you ran compilation once, there will be *.ser files in /var/di and you should delete them, otherwise they are still used.

    – Fabian Schmengler
    Mar 6 '16 at 12:52






  • 1





    even in developer mode, if create constructor or modify any of them, you still need to run setup:di:compile. maybe this is now required in latest magento version.

    – Doni Wibowo
    Oct 3 '17 at 13:57







  • 1





    DoniWibowo @Suman-PHP4U I updated the response about the code changes

    – KAndy
    Apr 12 at 16:21














9












9








9







First of all, compilation need only in production mode. If you develop, you do not need to run compilation



It's hard to improve compilation, because in this process build tree of all classes in system. For example change in 'di.xml' can affect half of classes.



In developer mode, if you modify/create constructor you still need to delete generated/code/ folder to remove auto generated code and cleanup cache






share|improve this answer















First of all, compilation need only in production mode. If you develop, you do not need to run compilation



It's hard to improve compilation, because in this process build tree of all classes in system. For example change in 'di.xml' can affect half of classes.



In developer mode, if you modify/create constructor you still need to delete generated/code/ folder to remove auto generated code and cleanup cache







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 12 at 16:13

























answered Jan 16 '16 at 10:41









KAndyKAndy

16.2k23346




16.2k23346












  • So, I should ignore this message in developer mode?

    – amitshree
    Jan 16 '16 at 10:55











  • Yes, You should ignor

    – KAndy
    Jan 16 '16 at 12:35






  • 4





    Also, as soon you ran compilation once, there will be *.ser files in /var/di and you should delete them, otherwise they are still used.

    – Fabian Schmengler
    Mar 6 '16 at 12:52






  • 1





    even in developer mode, if create constructor or modify any of them, you still need to run setup:di:compile. maybe this is now required in latest magento version.

    – Doni Wibowo
    Oct 3 '17 at 13:57







  • 1





    DoniWibowo @Suman-PHP4U I updated the response about the code changes

    – KAndy
    Apr 12 at 16:21


















  • So, I should ignore this message in developer mode?

    – amitshree
    Jan 16 '16 at 10:55











  • Yes, You should ignor

    – KAndy
    Jan 16 '16 at 12:35






  • 4





    Also, as soon you ran compilation once, there will be *.ser files in /var/di and you should delete them, otherwise they are still used.

    – Fabian Schmengler
    Mar 6 '16 at 12:52






  • 1





    even in developer mode, if create constructor or modify any of them, you still need to run setup:di:compile. maybe this is now required in latest magento version.

    – Doni Wibowo
    Oct 3 '17 at 13:57







  • 1





    DoniWibowo @Suman-PHP4U I updated the response about the code changes

    – KAndy
    Apr 12 at 16:21

















So, I should ignore this message in developer mode?

– amitshree
Jan 16 '16 at 10:55





So, I should ignore this message in developer mode?

– amitshree
Jan 16 '16 at 10:55













Yes, You should ignor

– KAndy
Jan 16 '16 at 12:35





Yes, You should ignor

– KAndy
Jan 16 '16 at 12:35




4




4





Also, as soon you ran compilation once, there will be *.ser files in /var/di and you should delete them, otherwise they are still used.

– Fabian Schmengler
Mar 6 '16 at 12:52





Also, as soon you ran compilation once, there will be *.ser files in /var/di and you should delete them, otherwise they are still used.

– Fabian Schmengler
Mar 6 '16 at 12:52




1




1





even in developer mode, if create constructor or modify any of them, you still need to run setup:di:compile. maybe this is now required in latest magento version.

– Doni Wibowo
Oct 3 '17 at 13:57






even in developer mode, if create constructor or modify any of them, you still need to run setup:di:compile. maybe this is now required in latest magento version.

– Doni Wibowo
Oct 3 '17 at 13:57





1




1





DoniWibowo @Suman-PHP4U I updated the response about the code changes

– KAndy
Apr 12 at 16:21






DoniWibowo @Suman-PHP4U I updated the response about the code changes

– KAndy
Apr 12 at 16:21


















draft saved

draft discarded
















































Thanks for contributing an answer to Magento Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f97541%2fmagento2-di-compilation-takes-too-much-time%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Sum ergo cogito? 1 nng

三茅街道4182Guuntc Dn precexpngmageondP