Code Monkey home page Code Monkey logo

Comments (9)

sstalle avatar sstalle commented on July 16, 2024 2

@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.

vingiarrusso avatar vingiarrusso commented on July 16, 2024

Thank you, I'm having this problem as well.

from php7cc.

vingiarrusso avatar vingiarrusso commented on July 16, 2024

@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.

sstalle avatar sstalle commented on July 16, 2024

@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.

seansan avatar seansan commented on July 16, 2024

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.

sstalle avatar sstalle commented on July 16, 2024

@seansan Did you try the code from the current master branch?

from php7cc.

solracsf avatar solracsf commented on July 16, 2024

@sstalle tried current master branch, error stills triggering.
Installed by composer.

memory_limit 256M

from php7cc.

BrandonShar avatar BrandonShar commented on July 16, 2024

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.

sstalle avatar sstalle commented on July 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.