Closed Mazyod closed 9 years ago
+1! It is really slow on some files..
Hey guys,
The problem isn't caused by the number of updates but by the syntax highlighting. Because the MiniMap shows much more text than the actual editor Xcode needs to go and fetch that information, which turns out to be a very slow process.
I managed to hook into the DVTTextStorage and make incremental updates to the MiniMap's text view but the syntax highlighting still slows it down allot.
I'll let you know if I figure anything out and in the meantime any suggestions are welcome.
Cheers, Stefan
Thanks for the reply.
Maybe something in the lines of doing some off-screen rending of an image on a worker thread or something. The worker might render once every X amount of time, or simply cancels the current work if new work comes in.
This will eliminate all the real time features, such as when the user types away or resizes the window, but in terms of priority, slowing the editor is breaking the whole experience, whilst losing the real time rendering might not even be noticeable by many users, while others will find it as a mere annoyance.
Now, if fetching the syntax highlight info is not thread safe, and has to be done in the main thread, then god bless. Your incremental updates approach is the best way in that case, probably. Giving the task a limited time on the main thread, then calling [[NSRunLoop mainRunLoop] runUntilDate:...];
to avoid hogging the main thread.
So I just pushed v2.0, performance shouldn't be a problem anymore :)
Sick, been waiting for this one! Productivity++ Thanks!
I certainly hope you won't have any problems with it and go productivity-- :)) Either way, please let me know how it goes.
Sadly for me: #39 :( Although the Zip install works.
Hey,
Thanks for the great plugin. I love it, however, it renders Xcode unusable when I am working on a C++ project, and especially with a huge file (1500+ lines of code).
I haven't looked at the implementation, but I would guess the only cause is that the minimap updates are too often. I mean, they don't have to be real time, right? The point of minimaps (IMHO) is to get a glance of how long the file is, and get an idea of where certain code might be.
Thanks,