Skip to content
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

Remove "compiler" related code #525

Closed
Flyingmana opened this issue Sep 14, 2018 · 6 comments
Closed

Remove "compiler" related code #525

Flyingmana opened this issue Sep 14, 2018 · 6 comments

Comments

@Flyingmana
Copy link
Contributor

For Years the Magento1 Compiler code is mostly unused and recommended against to use it.
To reduce Code/Logic (and because someone suggested it) I would like to see the Compiler related code be removed (maybe leave empty methods, in case its needed for compatibility reasons?)

What are your takes on this?

Context what it is:
https://magento.stackexchange.com/questions/179093/what-is-compilation-in-magento-and-its-use
and prove I have prejudice here:
https://magento.stackexchange.com/questions/12996/when-should-i-use-the-magento-compiler/15204#15204

@Flyingmana Flyingmana added question good first issue easy to solve issues labels Sep 14, 2018
@rafaelpatro
Copy link
Contributor

Referring Alan Storm article 2011:
"In computer science the term compiler usually refers to transforming code from one language (like C) into another language (like binary machine code). The Magento compiler transforms PHP code into – more PHP code!"

I think since 2011 PHP performance was so increased that searching for M1 files in separate directories is no more a bottleneck. I don't remember where to find the reference but some time ago I've read a benchmark showing that M1 compiler has no effect in PHP7.

@Flyingmana
Copy link
Contributor Author

a big part of this improvement is because of the OpCache, which additionally caches file access so effectively, that the number of files became not relevant for PHP anymore

@colinmollenhour
Copy link
Member

+1, remove it to prevent use

@tmotyl
Copy link
Contributor

tmotyl commented Sep 15, 2018

just for a reference, long time ago together with Fabrizio we've developed an extension which caches autoloaded paths, as an alternative for the compiles https://github.com/AOEpeople/Aoe_ClassPathCache
Basically it remembering paths for all requested files, and then on destruct of varien autoload, it saved it to a file.

@FredericMartinez
Copy link
Contributor

+1

edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Dec 6, 2018
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Feb 14, 2019
@sreichel sreichel closed this as completed Mar 5, 2019
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Apr 1, 2019
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Aug 22, 2019
edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Oct 25, 2019
@Ig0r-M-magic42
Copy link
Contributor

👍

edannenberg pushed a commit to edannenberg/magento-lts that referenced this issue Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants