microsoft / tolerant-php-parser

An early-stage PHP parser designed for IDE usage scenarios.
MIT License
886 stars 80 forks source link

Memory profiling tools? #13

Open mousetraps opened 7 years ago

mousetraps commented 7 years ago

Right now, it's fairly obvious where the majority of our memory usage stems from (ahem PHP objects...), and we have some ideas on how to cut down on that when it comes reducing the cost of the token representation, but as we progress, it would be helpful to have something other than raw arithmetic :wink:.

felixfbecker commented 7 years ago

You can profile PHP applications with XDebug and a profile viewer like QCacheGrind

nikic commented 7 years ago

As far as I know XDebug does not support memory profiling. However, there is https://github.com/arnaud-lb/php-memory-profiler, which added PHP 7 support a couple of days ago.

TysonAndre commented 6 years ago

xDebug 2.6.0 is out, and it supports memory profiling. I haven't looked at the memory profiles before, so I'm not familiar with how well it works

https://xdebug.org/docs/profiler

Since Xdebug 2.6, the profiler also collects information about how much memory is being used, and which functions and methods increased memory usage.