View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002054 | Xdebug | Tracing | public | 2021-12-17 12:20 | 2022-02-01 16:27 |
Reporter | strk | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.1.2 | ||||
Target Version | 3.1dev | Fixed in Version | 3.1.3 | ||
Summary | 0002054: Slowdown when calling a function with long string parameters | ||||
Description | Hello, I noticed that multiple calls to substr with some long parameter (eg. 512kB) makes xdebug profiling very slow. Here's a simplified test case: #php.ini:
#test.php:
$ time php test.php (without xdebug)
$ time php -c php.ini test.php (with xdebug)
After some digging I found 3 problems:
xdebug_var_export_line:
| ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 8.0.10-8.0.19 | ||||
|
I've started working on this, and there is a branch and PR: https://github.com/xdebug/xdebug/pull/815 It seems to be a lot faster, as I now only escape the first x characters that are going to be shown — that should also solve the truncation issue. I have not yet merged this as I haven't written tests for these two issues. Your third point is not valid in the context of the tracer (not profiler). The tracer is not meant as a full and accurate profiler, for that you need to use Xdebug's "profile" mode (https://xdebug.org/docs/profiler). This has been designed to have a lot less overhead than the tracer, which is meant to show a lot of information about each function call and argument list. The profiler does not care about argument lists at all, and hence it wouldn't cause a slowdown to try to truncate or escape them. |
|
Fixed for Xdebug 3.1.3. through https://github.com/xdebug/xdebug/pull/815 |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-12-17 12:20 | strk | New Issue | |
2021-12-24 10:16 | derick | Assigned To | => derick |
2021-12-24 10:16 | derick | Status | new => assigned |
2021-12-24 10:16 | derick | Note Added: 0006188 | |
2021-12-24 10:16 | derick | Category | Profiling => Tracing |
2021-12-24 10:16 | derick | Target Version | => 3.1dev |
2021-12-24 10:17 | derick | Description Updated | |
2021-12-24 10:18 | derick | Description Updated | |
2021-12-30 16:35 | derick | Status | assigned => closed |
2021-12-30 16:35 | derick | Resolution | open => fixed |
2021-12-30 16:35 | derick | Fixed in Version | => 3.1dev |
2021-12-30 16:35 | derick | Note Added: 0006190 | |
2022-02-01 16:27 | derick | Fixed in Version | 3.1dev => 3.1.3 |