Comments (9)
@andreimavenhut @vingiarrusso Can you please check out the code from the memory-issues branch and try again? It should require considerably less memory. Although I have to say that 35 MB still may not be enough if your projects are sufficiently large. If this is the case, the only advice I can give is to increase PHP memory limit.
from php7cc.
Thank you, I'm having this problem as well.
from php7cc.
@sstalle It worked much better on that branch. I still hit the memory limit but it went significantly farther than before. Will look into your suggestion. Fantastic tool you've created, thanks again!
from php7cc.
@vingiarrusso Is the project you are trying to check public? Can you provide a link to it so that I can try to investigate further?
from php7cc.
Confirmed. We see this too. PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 134217728 bytes) in phar:///php7cc.phar/src/Token/TokenCollection.php on line 18
from php7cc.
@seansan Did you try the code from the current master branch?
from php7cc.
@sstalle tried current master branch, error stills triggering.
Installed by composer.
memory_limit 256M
from php7cc.
easy fix for me was just to manually set a higher memory limit in the executable file (php7cc/bin/php7cc). Worked great running in the root folder of my fairly large project after that.
from php7cc.
Some more improvements reducing memory usage have been made. 90% of memory is consumed by PHP-Parser on an average run now, and I don't think that its memory usage can be brought down significantly. I think that current memory handling is efficient enough, as checking 14024 files requires 69.2 MB of memory, as reported by Blackfire:
Checked 14024 files in 1397.730 seconds
Blackfire Run completed
Profile URL: https://blackfire.io/profiles/...
Total time: 23 min 18 s
CPU time: 22 min 48 s
I/O: 30.2 s
Memory: 69.2 MB
Network: n/a
I've also added a note about increasing memory limit to readme in case someone needs that.
from php7cc.
Related Issues (20)
- False positive: Cannot redeclare global function
- False positive: Namespace declaration statement has to be the very first statement
- False Positive: call static method on FQCN string
- PHP Fatal error: Cannot access private property HOT 1
- False Positive: Function argument(s) returned by "func_get_args" might have been modified HOT 6
- False Positive: [Error] Syntax error, unexpected T_SWITCH, expecting T_STRING on line 55. Processing aborted.
- Command "php7cc" is not defined. HOT 1
- Failed to catch: Fatal error: Cannot use $this as parameter in ... HOT 1
- Global composer config HOT 3
- Globbing patterns in Exclude HOT 1
- Is possible to turn specifics checks? HOT 1
- Backward incompatible changes for PHP7 too few function arguments are not detected HOT 3
- Unhelpful "Closing delimiter foo not found" message HOT 3
- Output result into a txt file HOT 2
- space between = and & fools the checker where =& would be caught
- Unquoted string as index or general not detected
- PHP nullable typehinting not supported now
- [Warning] "yield" usage in expression context HOT 1
- Error without a file: [Error] file_get_contents(): Filename cannot be empty. Processing aborted.
- Should "does not cause an error in PHP 7" be an warning? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php7cc.