• 0

    posted a message on An alternate method for defining embedded lilbraries in your TOC
    Quote from sylvanaar »

    So you have a toc which references many lua files which dont exist, and one that references blank files?

    Yes.

    More testing:
    There appears to be a 140 second time limit on logging in.
    Warmup's login time is consistantly ~10 seconds shorter than my manually timed amount, regardless of addon stuff. With no addons it takes me about 10 seconds to log in, so this seems accurate.
    Putting actual code into the files has no mesuarable effect -- the additional time for each file is consistantly .0013 - .0015 seconds, regardless of whether or not the file exists as long as the total amount of lua is kept consistant (and lua parse time is incredibly trivial - 35k lines (8.8 MB) of non-executing code split into 100 takes ~2 seconds to load)

    Regardless of what I do, I can't reproduce a performance problem from a large number of files. Even 50k files only takes 60-75 seconds (and produced a 8 megabyte FrameXML.log)
    Posted in: Lua Code Discussion
  • 0

    posted a message on An alternate method for defining embedded lilbraries in your TOC
    Quote from sylvanaar »

    How much time does it take to load if all the lua files are missing?

    Average of .0013 seconds per file over a total of 40 logins/UI reloads with varying ToC sizes. Unless it's only happening on initial logins and warmup is not recording the time spent in error routines (entirly possible), I can't reproduce any speedup from empty files existing. I'd consider having a useful FrameXML.log to justify removing the dead ToC entries, though.
    Posted in: Lua Code Discussion
  • 0

    posted a message on An alternate method for defining embedded lilbraries in your TOC
    Concatenating files won't give any meaningful performance increase (in addition to just being a bad idea). Using the following script to generate addons with varying numbers of files (between 10 and 10000):
    #!/bin/env python
    import os
    path = "c:\\Games\\World of Warcraft\\Interface\\Addons\\TestAddon"
    tf = open(os.path.join(path, "TestAddon.toc"), "a")
    for i in range(10):
    	f = open(os.path.join(path, str(i) + ".lua"), "w")
    	f.write("local a = 1")
    	f.close()
    	tf.write("%d.lua\r\n" % i)
    tf.close()

    With my laptop's rather slow and low quality harddrive, each additional file makes the addon load take an additional .0015 seconds. I have 1085 .lua files in my addons folder. Reducing this to 171 (one per addon) would save 1.371 seconds. (Less actually, as parsing the "local a = 1" takes a non-zero amount of time)

    I'm not quite sure why I just spent the time to test that.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.