matoom / frostbite

MUD client for dragonrealms.
29 stars 17 forks source link

Improved import highlights from Genie #87

Closed fourier closed 3 years ago

fourier commented 3 years ago

1) Added button in Highlights Text tab to import from Genie 2) Moved GenieUtils to MainWindow to be accessible from another classes but CommandLine. Main window also subscribes to its signal directly 3) Improved parsing of Genie highlights.cfg entries.

One thing I noticed though is after importing a lot of highlights (from http://elanthia.org/) the output is slow. Need to optimize the highlighting process. UPDATE: I solved the performance drop in the commit 851de0c here. On my measurements after importing all the highlights from elanthia.org (it is more than 200 entries) the original processing time for almost every text entry was up to 250 or more milliseconds. Measuring performance I found out the Highlighter class was guilty. I went through it and pre-calculated necessary tags, regexps etc all values are known on a highlight load time. It gave me instant performance increase, dropping the processing time to 1-2milliseconds.

matoom commented 3 years ago

I don't want to accept this as part of a ui integration. This feature was only added as a half-measure knowing that the settings between two clients are not fully compatible and have to treated as such. I've already had people reporting issues and i don't want it to be readily available in the ui. I also find it to be in poor taste as i don't have any affiliation to genie and i'm not trying to encourage people to switch over from genie in any way.

fourier commented 3 years ago

Ok, thats fine, I can isolate just a commit with optimizations in a separate pull request, without anything related to genie (or you can extract the commit mentioned with optimizations).