Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.16k stars 303 forks source link

Memory leak in Color Scheme Editor #1491

Open cyberbit opened 8 years ago

cyberbit commented 8 years ago

Short Summary

The Color Scheme Editor takes a long time to update the interface in some cases. I discovered that while it is running, memory usage takes a huge leap (see attached image).

Steps to Reproduce

Open Task Manager. Open Color Scheme Editor. Make some changes. Click Apply.

Expected results

Memory/CPU usage spikes slightly, then returns to normal once completed.

Actual results

Memory usage continues to grow, CPU is pegged.

Platform Information

Komodo Edit or IDE? Edit Komodo Version? 10.0.0 Operating System (and version)? Windows 7 x64

Additional Information

image

Naatan commented 8 years ago

Woah that's a lot. I'm not seeing this myself on Linux.

Could you try reproducing this in safe-mode? Help > Troubleshooting > Restart in Safe-mode.

cyberbit commented 8 years ago

I restarted in Safe Mode, and it wasn't as drastic as before. Perhaps an addon is to blame?

Before making a bunch of changes (changing themes, fonts, colors, back and forth several times): image

After: image

cyberbit commented 8 years ago

I tried again with my configuration, with all addons disabled. image That tiny hump in memory about 30% in was changing a CSS property in the LESS editor. That huge hill was deleting a style block from the LESS. The CPU was pegged for that whole time. I watched the memory usage jump from ~600 M to 1500+ M in less than 5 seconds. The whole Komodo interface froze and the side panes lost their styles, like you would see if CSS fails to load on a webpage. Unfortunately I didn't get a screenshot of that in time. As I'm writing this, it's been about 10 minutes and it's settled down to about 800 M.

Naatan commented 8 years ago

Ok so interacting with the dialog is crucial to reproducing your issue? What type of changes are you making? Does applying them factor into it or does the "leak" happen without applying?

cyberbit commented 8 years ago

Ok so interacting with the dialog is crucial to reproducing your issue?

Yes, I would say interacting with the dialog is at least correlated to the problem, if not the causation.

What type of changes are you making?

For my config, simple colors and fonts. Sometimes a LESS change, like adding

font-size: 1rem !important;

in a block.

Does applying them factor into it or does the "leak" happen without applying?

Applying definitely factors into it. It will fluctuate without applying, but that could be attributed to Komodo background tasks. As soon as I apply it, there is definitely some change.

Naatan commented 8 years ago

Hmm I can reproduce it simply by repeatedly applying the color scheme to the interface.

I'll dig into this. Hopefully it's not a Mozilla bug, but it looks like it might be.

Naatan commented 8 years ago

For now I'd recommend you restart Komodo after you're done configuring your color scheme.

cyberbit commented 8 years ago

@Naatan Sounds good to me. Hopefully I'll decide on a scheme I like, haha!

Defman21 commented 8 years ago

Being me becomes harder and harder each time soneone finds a bug related to color schemes.