Bug 472226 - Slow variable view refresh on xdebug
Summary: Slow variable view refresh on xdebug
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2015-07-08 17:17 EDT by Dawid Pakula CLA
Modified: 2020-05-14 10:16 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Pakula CLA 2015-07-08 17:17:24 EDT
Full explanation on this forum thread: https://www.eclipse.org/forums/index.php/t/1068151/
Comment 1 Nobody - feel free to take it CLA 2015-09-09 16:36:00 EDT
Thank you Dawid. This actually happens on PDT 3.5, and is visibly (in part?) a regression from PDT 3.4.

To clarify, this is issue #2 discussed in the forum message. When the Variables view is refreshing, its title is in italics.

The refresh time depends on the project. I noticed this issue in a proprietary project where in certain areas (I believe only in the global scope), any statement (even the fastest) would take at least 1 or 2 seconds to step over. This minimum time taken clearly depends on the variables in the scope.

Unfortunately, the code is huge and I have no rights over it, so I cannot share. It would be interesting to produce a test case where stepping is slow and see if others reproduce, but I am not sure how to do that. Would simply declaring a huge string cause it, or does it depend on the number of variables (and their types)?
Comment 2 Nobody - feel free to take it CLA 2015-09-09 16:40:42 EDT
Bartlomiej Laczkowski has asked for my .log file. I hesitate to attach it since it is full of errors (almost 1 MB). But there are no errors generated when this "problem" appears. The last errors logged are from before:

!ENTRY org.eclipse.php.debug.core 4 4 2015-09-09 15:00:18.069
!MESSAGE class org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpTarget : DBGp Response Error: eval:=206 msg:error evaluating code

!ENTRY org.eclipse.php.debug.core 4 4 2015-09-09 15:00:21.507
!MESSAGE class org.eclipse.php.internal.debug.core.xdebug.dbgp.model.DBGpTarget : DBGp Response Error: eval:=206 msg:error evaluating code
Comment 3 Bartlomiej Laczkowski CLA 2015-09-09 17:21:33 EDT
Hello Filipus,

Did you try to change the default value of "Max children" option to eg. 20 in XDebug preferences (Window -> Preferences -> PHP -> Debug -> Debuggers)? Can you try to change it and see if that speeds up refreshing of Variables view?
Comment 4 Nobody - feel free to take it CLA 2015-09-10 00:14:05 EDT
Sorry Bart, I had forgotten to.

The section I am currently using to reproduce has each step taking about 1 second. It is clear that changing from 51 to 20 does not cause steps to take 20/51 of a second. I do not see an obvious difference, but it is non-trivial to time a second precisely, so I cannot say this causes no significant change. If anyone has a simple tip to slow down the CPU by an order of magnitude on Windows 8.1, I can retest.