linuxgurugamer / QuickMods

A plugin collection for Kerbal Space Program
http://forum.kerbalspaceprogram.com/index.php?/topic/85834-1
GNU General Public License v3.0
5 stars 8 forks source link

Search filter set every frame in editor #8

Closed tivec closed 2 years ago

tivec commented 4 years ago

I've been looking at reasons why the search is so incredibly slow in the VAB, and stumbled on the refresh method in QuickSearch. https://github.com/linuxgurugamer/QuickMods/blob/a615c20311cceab4ad4e889cde8cac92ae4cda06/QuickSearch/QS_Editor.cs#L175-L179

For some reason, the filter is set every frame. While this probably isn't the cause for the slowdown, it sure does not help. I'll dig a bit at this and set up a PR if it is necessary.

Gordon-Dry commented 2 years ago

This also seems to be the reason for the insanely low fps in R&D as soon as QuickSearch is used there. No log spamming, just very slow responses on every aspect of the UI.

ghost commented 2 years ago

This is on my to-do list, it's incredibility annoying, as I'm sure you know I may look at it tomorrow night, on my live stream

ghost commented 2 years ago

This also seems to be the reason for the insanely low fps in R&D as soon as QuickSearch is used there. No log spamming, just very slow responses on every aspect of the UI.

Have you confirmed it's QuickSearch? The code you highlighted doesn't really do that much.

also, the only slowdown I've seen is while entering a string in the quicksearch field, other than that, the editor seems ok

Gordon-Dry commented 2 years ago

The OP was not me - and I have no issues in VAB (but a huge delay until the search result appears), but the fps issue is in R&D.

linuxgurugamer commented 2 years ago

The search issue in Editor has been fixed in the latest release. I never experienced (and was unable to replicate) any issue in the R&D, but I implemented the same fix there, the problem was the same although the code was different.

I Did exerience the lag in the editor, that's now fixed