View Issue Details

IDProjectCategoryView StatusLast Update
0001096XdebugUncategorizedpublic2015-02-22 14:30
Reporterdanslo Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Fixed in Version2.3.0 
Summary0001096: Breakpoint bottleneck in large codebase
Description

An earlier bugfix, http://bugs.xdebug.org/view.php?id=843, made sure that xdebug_sprintf always works with C locale. To do this, it calls setlocale multiple times.

One of the functions that calls into xdebug_sprintf is handle_breakpoints, which can be called many times when dealing with a large codebase. In the case of Magento 2, when preprocessing LESS files, this eventually caused a single request to call setlocale over 8 million times.

Steps To Reproduce
  • Install Magento 2.
  • Start a debug session.
  • Set a breakpoint anywhere.
  • Visit some preprocessing URL like pub/static.php?resource=frontend/Magento/blank/en_US/css/styles-m.css
  • Prepare to wait almost a minute for the request to finish (compared to 0000019:0000015 seconds without xdebug).
Additional Information

A pullrequest with additional information is here:
https://github.com/xdebug/xdebug/pull/138

TagsNo tags attached.
Operating System
PHP Version5.6.0-5.6.4

Activities

derick

2014-12-23 21:59

administrator   ~0002943

Thanks very much for the fix!