4aiman wrote:It is One Thing to concat strings while registering nodes (i.e. at a server startup) and The Other Thing to do that every time someone opens inventory. Aside from additional calculations this adds an extra delay - once the minetest.show_formspec is called the server will wait it to finish. The same goes to the get_meta replacement.
rubenwardy wrote:The name was confusing to me, maybe put: [Mod] Formspex [formspex] - Consistent backgrounds
4aiman wrote:It is One Thing to concat strings while registering nodes (i.e. at a server startup) and The Other Thing to do that every time someone opens inventory. Aside from additional calculations this adds an extra delay - once the minetest.show_formspec is called the server will wait it to finish. The same goes to the get_meta replacement.
rubenwardy wrote:I doubt that the delay will be noticeable. Even with 40 players there won't be more than 100 opens per second. Optimise in the right places, in the places that need it most. If this was C++ or a lower level language, then yes these optimisations would be good.
4aiman wrote:To speed-up your code, try using a table.
Just populate it with the pieces of a formspec and then use table.concat.
4aiman wrote:@orwell
Anyway, I'd like to cite the other part of my message (which was the reason to post it):4aiman wrote:To speed-up your code, try using a table.
Just populate it with the pieces of a formspec and then use table.concat.
^ This is really important. Just try it and you'll see the difference.
amadin wrote:I mean change to not default color, for example to red.
Users browsing this forum: No registered users and 9 guests