papyrus-lang icon indicating copy to clipboard operation
papyrus-lang copied to clipboard

Completion Extremely Slow

Open slacksystem opened this issue 3 years ago • 12 comments

Describe the bug The completion functionality takes at least ten seconds and the errors seem to only track the symbols at a speed of like one letter per second

To Reproduce Start typing code and either wait for completion or press Ctrl-Space

I tried the pre-release version as well and had the same issue. It's certainly possible it's an issue with my config or something, especially since I didn't see this issue already posted, but I would like to figure out how to use the extension's functionality regardless. If there's any other information I could provide that would help diagnose I'm happy to do so

EDIT: I also looked at my task manager during a completion and saw the process DarkId.Papyrus.Host.Skyrim.exe using about 15% of my Intel i7-9700K CPU @ 3.60GHz. Dunno if that's normal or not but I figured extra info can't hurt

slacksystem avatar Jan 23 '23 19:01 slacksystem

I've experienced the same issue, but only under certain circumstances. The main driver seems to be the size of the script at hand and the random read speed of the drive the scripts are on.

BellCubeDev avatar Jan 24 '23 00:01 BellCubeDev

Hmm I don't know about my random read speed, but this is a hefty script with a few includes. Is it just too large to use completion? Or is this a bug that is fixable. I understand every tool has its limits I just don't know what's feasible and what isn't.

slacksystem avatar Jan 24 '23 02:01 slacksystem

It's difficult to know why it's particularly bad because there are limitations on what profiling code I can add. We can probably narrow it down to individual files, at least. I suppose it could involve how many different files you've looked at in a session. I'll look into it because it shouldn't be that terrible.

joelday avatar Jan 27 '23 00:01 joelday

Ok let me know what if anything I can do to help

slacksystem avatar Jan 27 '23 07:01 slacksystem

At the absolute minimum, we're going to need the full project you're developing. Please give us a link or upload it somewhere.

nikitalita avatar Jan 27 '23 08:01 nikitalita

Here is the most recent project I've been working on that I had the issue. It's pretty big and so is UIExtensions, the import

https://github.com/slacksystem/where-are-you

slacksystem avatar Jan 27 '23 20:01 slacksystem

Also happened with this fairly basic project. Inside one of the events I tried to add Debug. and hit Ctrl-Space for completions and it took 20-ish seconds for them to come up.

slacksystem avatar Jan 28 '23 23:01 slacksystem

I've observed this too. With a two line script, but any script has it happen.

skyler3d avatar Sep 13 '23 00:09 skyler3d

@slacksystem are you running the CK out of MO2 by chance? I tried running it in MO2, its slow as heck. Ran it outside of MO2 and the autocomplete runs like a top.

skyler3d avatar Sep 13 '23 00:09 skyler3d

@slacksystem are you running the CK out of MO2 by chance? I tried running it in MO2, its slow as heck. Ran it outside of MO2 and the autocomplete runs like a top. I may have been I'm not sure, I haven't really modded skyrim in a while. This is reminding me I should probably check on my mods on nexus. Thank you very much for the suggestion though!

slacksystem avatar Sep 13 '23 19:09 slacksystem

@joelday have you tried it using MO2 out of curiosity?

skyler3d avatar Sep 14 '23 13:09 skyler3d

@skyler3d I haven't, but we're working on integrating a different compiler right now, which will greatly improve performance, so, the only area to attempt to address this will be replaced soon anyway.

joelday avatar Sep 27 '23 18:09 joelday