-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger is very slow and uses too much memory when large lists are around #8024
Comments
Pavel, I added some code to the command-line debugger to display large lists in slices instead of the whole list at once. This was committed last week; can you confirm that the version you saw this behavior was trying to display slices? |
This comment was originally written by podivilov@google.com You are right. I was using an older version. The latest build looks much better, thanks! Still, each debugger step takes ~5 seconds and I get lots of "Exhausted heap space, trying to allocate 268435488 bytes." messages in console, which perhaps indicate that something is going wrong. Overall, the Editor is still quite slow when debugging the sample. |
This comment was originally written by podivilov@google.com Removed Priority-High label. |
This comment was originally written by @mhausner I think what's happening is that the wire protocol is calling the toString() method of the list variable to transmit a textual representation of the value. As a side effect, a huge buffer for the C string gets allocated. The wire protocol needs to be smarter when creating the textual value. Added Accepted label. |
This comment was originally written by @mhausner I have a change that improves the situation. For this program: void main() { class A { The wire protocol now submits this info when breaking at the print(ok) statement: Isolate 7114 paused on breakpoint Before this change, the debugger choked on this. |
This issue was originally filed by podivilov@google.com
import 'dart:scalarlist';
void main() {
var list = new Int8List(16 * 1000 * 1000);
print(list.length);
print('ok');
}
Without breakpoints this same application runs to completion in less than a second.
This issue makes the debugger mostly unusable if you have large list in your program, so setting priority to high.
The text was updated successfully, but these errors were encountered: