View Issue Details

IDProjectCategoryView StatusLast Update
0001725XdebugStep Debuggingpublic2020-01-16 14:13
Reportervtsykun Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.8.1 
Target Version2.9.1Fixed in Version2.9.1 
Summary0001725: 4x debugging performance degradation after update 2.7.2 => 2.8.2
Description

Debugging has become very slow and uses more RAM after updating the version, for example I ran symfony clear cache with attached debugger before and after update to 2.8 and compare result:

Xdebug 2.7.2
$sudo perf stat -p 26282
Performance counter stats for process id '26282':

  58076,016717      task-clock (msec)         #    0,847 CPUs utilized          
           939      context-switches          #    0,016 K/sec                  
            34      cpu-migrations            #    0,001 K/sec                  
        18.496      page-faults               #    0,318 K/sec                  

188.482.108.394 cycles # 3,245 GHz
427.580.103.342 instructions # 2,27 insn per cycle
104.649.086.842 branches # 1801,933 M/sec
698.497.423 branch-misses # 0,67% of all branches

  68,535789006 seconds time elapsed

Xdebug 2.8.2
sudo perf stat -p 26894
Performance counter stats for process id '26894':

 231818,727359      task-clock (msec)         #    0,892 CPUs utilized          
         1.552      context-switches          #    0,007 K/sec                  
            12      cpu-migrations            #    0,000 K/sec                  
       425.739      page-faults               #    0,002 M/sec                  

755.832.442.354 cycles # 3,260 GHz
1.793.505.914.134 instructions # 2,37 insn per cycle
449.236.033.540 branches # 1937,876 M/sec
2.621.621.923 branch-misses # 0,58% of all branches

 259,762860110 seconds time elapsed

I tried also to compile Xdebug with patch https://github.com/xdebug/xdebug/pull/528, but that didn't help me

Steps To Reproduce

php.ini config

xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1

1) Take any large application, for example https://github.com/oroinc/platform-application
2) Run symfony clear cache with attached remote debugger

TagsNo tags attached.
Operating System
PHP Version7.2.20-7.2.29

Activities

vtsykun

2019-12-07 23:50

reporter   ~0005198

The bug was introduced here https://github.com/xdebug/xdebug/pull/463

vtsykun

2019-12-08 14:59

reporter   ~0005203

Profiling with perf

derick

2020-01-13 11:00

administrator   ~0005215

Could you please try the xdebug_2_9 branch from GitHub? (https://github.com/xdebug/xdebug) I think I have much improved on this as per https://gist.github.com/amenk/29636622c60a420330a8b827d166f9cf