Quantcast
Viewing all articles
Browse latest Browse all 1550

Utilities and Tools • Re: FontSelector Context Menu

That makes sense.. that's what happens when you implement something you don't completely understand (taking about the substitutions, which is a topic I'm really far from understanding).

Thank you for the instructions, not sure if I'll ever fix it though. Maybe I feel like it some time in the future, who knows.
It's not really about substitutions or regex, but about logic, to be honest - you don't need to fix the 'old' version, just understand where it was inefficient for the future, that's why I posted the above. My version was of course built with extracting just a single font from the entire list at once, so when you copy pasted that 10 times, it increased the workload and the time to complete it ten-fold. Also, since we're at it, this applies to everything, including Lua. Lua tables might be very fast, but there too, it will work faster if you work with, iterate, or get individual stuff from a table of just 10 items or less, than from a table of hundreds of items. The time difference to complete the task might not be obvious with the naked eye, but when you use os.clock() to measure start and end times of the operation and compute the difference, it will be noticeable (especially if you repeat the process like 1000 times to see it better). Image may be NSFW.
Clik here to view.
;)

Statistics: Posted by Yincognito — Today, 3:19 pm



Viewing all articles
Browse latest Browse all 1550

Trending Articles