2

When developing for Magento 2 one of the more time consuming system tasks is running bin/magento setup:di:compile.

Since the compiler executes several tasks in a queue, I'm thinking executing them all at once would increase compiling speed by using a separate php process / core per task?

This is of course only possible when the queued tasks don't depend on each others execution result.

I'm not very familiar with the details of the compiling process, maybe someone can elaborate whether this solution would be feasible / possible at all?

4
  • When you developing for Magento 2 you should not run setup:di:compile. Why are you doing this?
    – KAndy
    Commented Sep 4, 2016 at 19:59
  • Shouldn't you do this to make the constructor dependency injection take effect? I've set the mode to developer mode, but still I need to run that command. Maybe I'm missing something? Commented Sep 4, 2016 at 22:48
  • As maximum, you need cleanup var/generated folder and clean caches. No need to run setup:di:compile
    – KAndy
    Commented Sep 5, 2016 at 6:54
  • I see indeed, thanks a lot. What about the var/di folder? If you add an answer I'll accept and close this question. Commented Sep 5, 2016 at 16:55

1 Answer 1

3

When you developing for Magento 2 you should not run setup:di:compile.

As the maximum, you need cleanup var/generated folder and clean caches.

var/di folder contains serialized data about class constructor parameters/inheritance that not need in developer mode.

1
  • Very interesting information... :) Commented Dec 9, 2020 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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