Coding made SLOWER due to AutoComplete Update

Reproduction Steps
I did some test on a Baseplate where I input 22K lines of code of:

print("Hello World")

and that’s where it started for autocomplete to lag. At around 10K lines of code, it still doesn’t lag but I think it’s because my code has a lot more characters than this code.
autocompletebug.rbxl (34.5 KB)

I also have sent the private content, the module script that has 11K lines of code to Logs / Crash Dumps / Other Bug Files group.

When does it happen?

This bug happens right after the autocomplete feature has been updated. I was not online a day after but 2 days after the update, I opened a specific script that contains 11K lines of code which did not lag a while before the update but now it takes 1 second to open the script and also 1 second for the autocomplete to log in.

Took like 1-2 seconds before I can see the keywords. I usually just “enter” and the keyword is there.

Only 1 script that has 11K lines of code lags the autocomplete. I believe this may also have happened is because my code isn’t as organized and optimized as it should be. (Like how user.HumanoidRootPart.CFrame is being repeated)

But take note that it really only happens right after the autocomplete feature has been updated.

Workaround

I did try to fix this by making a version 2 module script that connects the code so I can code as fast as I did before. (I only have 1 module script that handles all the skills but I made another module script that will contain the new skills I will implement in my game)

A fix could be to have a way to hide certain features the new autocomplete has.

Issue Area: Studio
Issue Type: Other
Impact: Medium
Frequency: Constantly
Date First Experienced: 2022-01-29 00:01:00 (+08:00)
Date Last Experienced: 2022-02-02 00:02:00 (+08:00)

23 Likes

I don’t have this issue. Would you be able to provide your pc’s specs?

2 Likes

32 GB Ram
i7-10700 CPU
2060 SUPER
I have 100 GB free in my SDD and 400 GB free in my HDD

3 Likes

I believe the update made it slower, look at the changes of the keyword suggestion UIs

Nevermind, my PC was lagging so I restarted. Fixed.

1 Like

Okay so after another 30 mins, it’s now lagging again.

1 Like

Could it be possible that the reason why this is happening is due to my code having 11,266 lines of codes?

3 Likes

It’s a script that has 11,266 lines.

My entire studio is lagging, I do not know why. I click a script, it takes 1 second to appear.

well yeah of course lol it has to load it all into the context. this is amplified if you try and open a script that has like a million lines of code for ex

4 Likes

That’s enough to explain why the script editor autocomplete lags for you, I don’t know if the luau analyzer supports caching but it has to scan 11k lines of code → generally would take some time depending on cpu

6 Likes

I do not know what you all mean, I’ve been coding it for around 10,900+ lines 2 days ago and I haven’t even lagged a single bit. Only when this update has been added, I don’t know what it is but I think it’s when the code keyword suggestion changes made that lag.

3 Likes

Was the Lua autocomplete feature enabled for you 2 days ago? If it was, then it means that it wasn’t the Roblox update.

And like you said, it stopped lagging when you restarted Roblox Studio. Is your entire PC lagging, or is it only Roblox Studio?

I never enabled autocomplete 2 days ago. I barely enable beta script features besides meshes and some things I understood.

I am not lagging, it didn’t lagged, Roblox Studio itself is not lagging. I tested out in other scripts, the autocomplete is working fine but when that specific script that has 11K lines of codes. The script takes 1-2 seconds to load, and 1 second for auto complete to load in.

EDIT: I tried removing a lot of stuffs in my game, nothing changes. It’s still lagging.

Well, just like what @ItzEthanPlayz_YT said. It’s probably lagging because it’s caching all of those lines of code.

I’ve checked, as of now I don’t know if you can disable the autocomplete thing. It’s gone out of beta, so you can’t disable it via Beta Features. You could also report this as a bug to Roblox.

Does it lag on a baseplate with a few lines of code script?

It shouldn’t be taking this much time to even cache all those lines of codes unless I have millions of lines in one script. It is 100% a bug so I suggest having a staff to move this in it.

1 Like

Obviously not. My Data Store script has 3,244 lines of code and the autocomplete is not lagging at all.

You’d have more luck putting this thread in #bug-reports:studio-bugs than here if you want something to be done about it.

Although to be fair, 11k lines of code will lag anything (and if you’re hitting 11k lines you should probably consider module scripts or seeing if you have any large clusters of repeated code that you can reduce down. I’ve rarely seen a purpose for over a few grand lines with all the features Roblox has)

1 Like