I need to paste about 800K lines of code, in the past i did with 1.6M and it worked but now it freezes on end for hours
I wouldnât say this is a studio issue but rather a network issue, are you running of WiFi or Ethernet?
FINALLY SOMEBODY MENTIONED THISâŚ
This is 100% a Roblox problem, because pasting 2k lines of code freezes me for around 10 seconds. Never, and I mean NEVER used to freeze at all. Genuinely disappointing and makes scripting a lot harder than it should be, powering imagination.
Infact, itâd be better to just paste the code in the RBXLX file at this point.
Ethernet this is not a wifi issue and im stuck on this, cause i need to update my airport data cause it too laggy to load
Try lowering the âLarge File Line Count/Character Thresholdâ settings under Script Editor. Otherwise, your best bet is an external text editor.
Both the old and new typesolver seem to parse and scan the entire source file on every new token, which used to be quite fast, until later additions to the Luau syntax and checker made parsing significantly more complex.
have you found a solution yet, im literally thinking about just pasting it in a rbxm and like doing that
?
What do you mean by external text editor
visual studio code for example
yeah but how would i import that into roblox
rojo or argon or whatever you wanna use
no Iâm pretty sure when roblox kinda forced the ai thing it just makes coding slower now
Im pretty sure .source has a limit, like 100K chars mines 800K lines
It looks like the data youâre getting is from an API? How I do it is every single time a new server starts, send an HTTP Request (and optionally send another one every minute or so). Iâve done this for a lot of my projects and I havenât ran into any issues for years.
If you really need to, the best way to do it would split the data into sections, by country, by time, by value, etc. and then have a module load all of that data into a single table.
this is not from a api? this is a csv which has been formatted for my use
Where did you get the data from? Is there any API for that website?
im pretty sure there is, but i need to format the data, the raw data is like 16mb but mine is 2mb formatted, if i load the full thing it lags
Can you just JSON Decode it and format it in the way you need and or change the way your code handles the data? If you canât do that, try splitting the data into different modules, and have a single module require all of those modules and add them to a table.
Or even better just donât require all that data at once, and only require that data when you need it.
Donât store big amounts of data in modules in the first place. Store it somewhere else and require it from there. You can store it in datastores, in a url endpoint you can require with HttpService, really anything that comes to mind.
Just donât store it in plain text inside a module script. Not only will the entire session lag when you open studio, but it will also take a ton of extra time to publish updates for that place. In general Roblox isnât optimized for very large scripts.
Another thing you can do is store the compressed version of the data in a module script, and decompress it inside code when you need it. But the main negative of that will be that you wont be able to edit said data. On the other hand, if this some sort of API result, you may not want to edit it in the first place.
There are many patterns in your data that you can take advantage of to compress it. For example the airport names all have english characters that are just capitalized in the first letter, this means you need just 5 bits to represent a character(because the english alphabet has 26 letters) instead of 8 bits that are actually used. Also there is categorical data in there that can be converted to enums and then bits. For example strings like âsmall_airportâ donât need to be stored whole, you just need to figure out all the different values, assign increasing numbers to them, and then figure out how many bits it takes to store them(it likely is 3-4 bits instead of all the bytes you waste). Even the coordinates can be compressed down using custom float representations if you are aware of how many decimal points you need.
Had the same problem when importing a rather large dictionary word list in to Studio. I do wonder whether turning off alot of the Script Editor functions would improve the import speed as I would expect alot of them will be involved in parsing the input, ie Script Analysis, et al.
since the command bar has access to Script.Source, if you already have the script somewhere in studio you can index the .Source variable from that script and set the .Source of your destination script to that variable. otherwise, try disabling anything in studio relating to the script editor intellisense/typechecking and try again. if that still doesnt work then you may have to cope unfortunately