Description
I have a “Large” script that I use for all the pathfinding in my game. It consists of about 2k lines which really isn’t that much, but recently I have begun noticing Studio start to chug when I begin typing more code. Studio idles around 5% - 7% CPU when I am just reading my scripts, but then when I begin typing it jumps to 30% to 40% and then I can begin to feel studio lag behind.
If you can type quick you will notice that you are typing much faster than Studio can keep up. This makes it a little slow to use the auto complete, as you have to wait for Studio to catch up.
Reproduction Steps
To reproduce this just open a large script, any script with 2k lines of code or more. Begin typing in those scripts, you will feel it chug. It gets more and more slow the more lines you add.
Microprofile Dump
microprofile-20200328-161706.html (2.8 MB)
Gifs and Screenshots
I copied my code multiple times to make the script larger, about 7k lines of code. I don’t know who would have 7k lines of code in one script but its possible I guess haha.
Heres a gif of me scrolling, youll see the CPU usage spike a lot but Studio still runs fine, it only lags when typing.
Studio
https://gyazo.com/edcdf1143e9ea24921e31af5becbd930
CPU Usage
https://gyazo.com/812aafeb3e79208a7cd97e405ae51210
Now here is a gif of me typing and you will see the CPU Usage jump. The video isnt lagging, that is literally how it is in Studio.
Studio
https://gyazo.com/50a1049d2df7121c841bd942b94ad02a
CPU Usage
https://gyazo.com/69c5877695eab4129f4222c89c01c64f
System Information
AMD Ryzen 3 2200G With Radeon Vega Graphics @ 3.5Ghz
16GB RAM
AMD Radeon ™ R9 Fury Series (R9 Nano)
Extra
I know many people wont have a 7k line script, but the problem is that this starts happening around 1k. If you type fast you will totally start to feel it chugging around 1k and It just gets worse and worse after 1k. I have used other code editors before and they can handle 20k lines of code smoothly. Studio seems to cap out at 30% CPU Usage it seems. So maybe there is a performance limiter built into Studio. I am aware of a performance limiter when you are playing games on Roblox, but I wasn’t aware of one while in Studio not playing anything.
Maybe it is poor optimization on AMDs end? I am I die hard fan of AMD but I will admit they arent the best when it comes to drivers, so it could be AMD?
Thank you and I hope you have a great day!