stefanceriu / SCXcodeMiniMap

Sublime Text like Minimap for Xcode
GNU General Public License v3.0
1.03k stars 87 forks source link

Improve speed #5

Closed MuOptics closed 11 years ago

MuOptics commented 11 years ago

Just a heads up, on longer files, it blocks the main thread takes quite a bit of time to construct. I'll have to uninstall it for now, I'm getting 10-20 second wait times switching between files on old legacy code. Otherwise, great work, this is awesome!

stefanceriu commented 11 years ago

I'm guessing it might have something to do with the incremental layout, triggering redraws of the minimap too often. I'll try to pin point the exact issue but let's consider it a feature for now :)

stefanceriu commented 11 years ago

It turns out that it's caused by the temporary attributes delegate callback (shouldUseTemporaryAttributes...). I wasn't able to find a fix for it just yet but I'm working on it. In the mean time you could disable the coloring and see how it goes.

hlfcoding commented 11 years ago

:+1:

stefanceriu commented 11 years ago

Hey guys,

I just pushed some speed improvements on the minimap's text view. While it's not perfect it should take care of most of your problems. In my case, rMBP ~3000 lines, it's still usable.

Please give it another shot and let me know how it goes.

Cheers, Stefan

tomredman commented 11 years ago

I'm still seeing this unfortunately. What's weird is that it was working fine until today, then one of my medium sized files is causing a 10-15 second freeze while it's loaded in the editor. It's about 1000 lines. 15" rMBP.

A real shame because this is easily the most useful plugin I've ever used. Let me know if I can help.

stefanceriu commented 11 years ago

Frankly I'm out of ideas, the textview can't deal with drawing that much text at such a small font. If you have any tips on how to make it better please share :)

tomredman commented 11 years ago

I will certainly take a look and see if a fresh set of eyes helps. It's the best plugin so I'd love to get it working for any size file.