I have been trying to get threading working on my plugin but I may actually rewrite it because of how I originally created it - the threading system works, but it still locks up the UI thread when used and that could be something simple or built right into the core of the system so I want to see if there is another way to improve the efficiency of the plugin. Right now I use a very simple but expensive process to map files which had to be used when I created a plugin for CodeMap. Since I’m no longer extending that project via stand-along plugin added to it, I have a lot more freedom and I’d like to use that freedom to look more into the Sublime Symbols system as it works project-wide and file-wide.
I was trying to increase performance and I have gotten it to around 0.1 to 0.01 seconds to load a cached file, but it can take substantially longer to map files. I work work large files on a 10 year old machine so it can take 10 seconds ( typically 6 ish for 15,000 lines and hundreds of entries, expansions and more ).
Sublime Symbols are captured in the background already, which is why I added a simple sublime Symbols system into the plugin, but I want to go a step further. Right now symbols are what Sublime Text provides me and I would be able to create new symbol mapping files but that would mean for each language I’d have to create a file…
I’d rather not do that. I’d rather capture ALL symbols, then process them that way… Or capture all function calls, function declarations, class declarations, and so on individually. But I have yet to find any function in the api which points towards creating sublime symbols dynamically.
It’s easy to highlight symbols by loading the list of symbols Sublime Text provides you and processing them since they provide information such as the line, start character, end character… The only other thing I can think of is to go through each syntax file, or when a new language is selected, and process the file to extract all of the possible symbols then create a file which would extract them then set up a map to ensure those are categorized using my system.
But there must be a way to do it in a more fluid manner - does anyone know of a way to set extracted symbols to * or something to ensure the generated list includes everything… Or a way to filter / mask the list easily using Sublime Text back-end?
This would ensure the mapping would almost entirely happen inside of Sublime Text Threading System and it would also index the project as the project changes making the plugin a possibility to be added natively into a Sublime Text release.
It improves efficiency so many times over, I believe everyone should have easy access to it and with the new features I have planned, it would make Sublime Text on par with some of the most advanced IDEs without the bulk or lag issues.
Thanks in advance