generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: load loadstring faster .___.

Previous Thread :: Next Thread 
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
13 Aug 2012 02:58 AM
i have been encoding a huge script and the load string take about 30 sec, how can i speed it up?

>Im not going to post the encode script because i will need 2 or more post to put it and secondly its private

perhaps something with the decode part that i made?


String = {code here}

local text = {}

for i=1,#String do
table.insert(text,string.char(String[i]))
end

loadstring(table.concat(text))()
Report Abuse
Gorgon13673 is not online. Gorgon13673
Joined: 13 Oct 2010
Total Posts: 71
13 Aug 2012 03:12 AM
I dont think anyone can help with such little information
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
13 Aug 2012 03:13 AM
^What info you need?
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
13 Aug 2012 03:53 AM
You call loading your string into a table coding/decoding? Thats a good joke xD.

Loadstring is pretty slow, so get used to it. Or: make your script shorter by using tables ;)
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
13 Aug 2012 03:58 AM
if i put my script inside Microsoft Words, it will have 32 pages ;~;
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
13 Aug 2012 04:01 AM
O.e can you please explain what sort of script that even is!?

Maybe you can try splitting it up in parts. Like 32 parts (1 page for every part) and you run 32 scripts that loads a part. Maybe thats faster?

You might try to see what takes the longest: the loadstring, or the table.concat stuff.

Try this and remember the values;

String = {code here}

local text = {}

local timerstart = tick()

for i=1,#String do
table.insert(text,string.char(String[i]))
end

print(tick() - timerstart, "this is for creating the table")
local timerstart2 = tick()

loadstring(table.concat(text)) --> No running, only load it.
print(tick() - timerstart2, "this is for da loading")
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
13 Aug 2012 04:03 AM
its a Script Builder Script, and im gona try out what you said and print the results.
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
13 Aug 2012 04:06 AM
Do that. I really think you better do not first create a huge table, then concentate everything. I think thats a huge speed up if you instantly load the string.
Report Abuse
TheRedAngel is not online. TheRedAngel
Joined: 17 Apr 2012
Total Posts: 471
13 Aug 2012 04:13 AM
btw, i cant split up the script.

0.041070938110352 this is for creating the table
0.0066087245941162 this is for da loading
Report Abuse
jobro13 is not online. jobro13
Joined: 05 Aug 2009
Total Posts: 2865
13 Aug 2012 05:21 AM
You said it was 30 seconds.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image