Time Nick Message 03:50 benrob0329 !tell Krock nvm, was a different problem 03:50 MinetestBot benrob0329: I'll pass that on when Krock is around 07:34 MinetestBot Krock: Aug-01 21:47 UTC how do I move the on_generated function? 07:34 MinetestBot Krock: Aug-02 03:50 UTC nvm, was a different problem 07:34 Krock nice. problem solved itself (for me) 07:39 ANAND Heya Krock 07:39 ANAND Nice timing ;) 07:41 Krock hi ANAND 07:42 ANAND :) 08:23 Krock "Post your screenshots!" will soon reach 1 million view 08:41 ANAND nice 10:21 Megaf Hi all 10:22 rubenwardy hi Megaf 10:22 rubenwardy long time no see 10:22 rubenwardy probably 10:22 Megaf yep, very long, how are you doing rubenwardy 10:24 rubenwardy good, good 11:16 IcyDiamond I try 12:21 DS-minetest !tell ANAND I've found you: ⊼ 12:21 MinetestBot DS-minetest: I'll pass that on when ANAND is around 12:21 ANAND Stupid bot... I am already around >.> 12:21 MinetestBot ANAND: Aug-02 12:21 UTC I've found you: ⊼ 12:21 ANAND ... 12:22 DS-minetest it's a nand 12:22 DS-minetest o/ 12:22 ANAND Hi! :) 12:25 Krock hey it's a NAND https://i.imgur.com/Oj4zExo.png 12:27 DS-minetest doesn't this cause a short circuit? 12:27 Krock where? 12:27 Krock lower NPN BJT to ground? add a resistor in front 12:27 DS-minetest if both are on, the power will flow to ground, right? 12:28 Krock power flows nowhere. it converts into heat. there's no big current flow due to the resistor 12:29 Krock oh wait. his username is actually an AND 12:29 DS-minetest dam dam damm 12:29 DS-minetest both are possible 12:30 Krock fixes. https://i.imgur.com/hGiU07h.png 12:30 Krock *fixed 12:30 Krock oh wait 12:32 ANAND Krock, adding the HUD element irrespective of breath would probably result in the breath bar flashing in and out of existence every once in a while, I think? 12:33 Krock fixed AND https://i.imgur.com/XImXxF2.png 12:34 Krock ANAND: it would appear but not disappear if the props are changed within the regain phase 12:34 Krock hi IhrFussel 12:35 IhrFussel Hello guys... I think set_wielded_item() takes up to 50 ms to execute 12:35 ANAND But why exactly would you want to show the breath bar if the player has full breath? o_O 12:35 Krock you think ? 12:36 IhrFussel I need someone with 5.0.1 or latest dev to confirm it with this code https://paste.ee/p/uVQIU 12:36 Krock ANAND: sorry? Are we talking cross each other? 12:36 Krock checking PR again 12:36 ANAND I'm speaking to you :P 12:37 * ANAND cleverly changed the topic of the conversation to avoid further embarrassment regarding his name :D 12:38 IhrFussel I debugged why my mob on_punch() callbacks take so long (20 ms on average and highest in profiler was 60 ms) so I added several .log() calls to the different parts of the code ... and as soon as I commented out 'set_wielded_item()' after adding wear to the weapon the execution time went from 30-60 ms to under 1 12:38 Krock the HUD bar will always be removed properly in the current PR state 12:39 IhrFussel I tested even just holding a steel ingot while running the snippet I just posted and STILL get ~ 30 ms 12:40 DS-minetest IhrFussel: you could measure the time in the source code, too 12:40 DS-minetest https://github.com/minetest/minetest/blob/b8aaef704d3e29c43edc3312a3c5e25516d9c864/src/script/lua_api/l_object.cpp#L345 12:40 Krock now I see what you mean by flashing since there's now no longer an additional step to trigger the "HUD remove" action 12:40 DS-minetest btw hi IhrFussel o/ 12:40 IhrFussel There is no need to measure it there when the call alone is definitely the culprit 12:41 Krock IhrFussel: that's to expect when it has to resend the entire inventory, I guess? 12:41 Krock 30ms is still a bit long, though 12:41 Krock probably slow inventory serialization 12:41 IhrFussel I need someone else first to confirm the values 12:41 IhrFussel It shouldn't be a problem on my end but who knows 12:44 Krock Time per call: 0.034 12:45 Krock that's in ms 12:45 Krock https://pastebin.com/raw/M94nwqX7 12:50 IhrFussel But I didn't change the engine code at all and AFAIK this only calls the engine directly right? No mod callbacks involved 12:51 CWz_ for some reason my version of minetest only lets me use english letters 12:51 CWz_ anything else won't type 12:52 DS-minetest tested, a single set takes much longer than the average in 1000 12:53 IhrFussel So you get 20+ ms too? 12:53 DS-minetest (ca. 100 ms and ca. 30 ms) 12:53 DS-minetest yes 12:54 IhrFussel With 5.0.1 ? 12:54 DS-minetest with newest aster 12:54 DS-minetest +m* 12:54 IhrFussel Okay then I think it's time to open an issue 12:55 DS-minetest Krock: that's in s, you devide twice by 1000 12:59 DS-minetest here's my test code: https://gist.github.com/DS-Minetest/acc13c4399fbd08b4ba8c50ea2596092 12:59 IhrFussel I hope that's enough details https://github.com/minetest/minetest/issues/8738 12:59 sfan5 do you have test code? 12:59 DS-minetest add testing code (eg. link to my gist:) 13:04 IhrFussel This is before I commented out 'set_wielded_item()' in my mobs code: 13:04 IhrFussel 2019-08-02 13:41:18: ACTION[Server]: MOB PUNCH DEBUG -> ADDING WEAPON WEAR 121 µs 13:04 IhrFussel 2019-08-02 13:41:18: ACTION[Server]: MOB PUNCH DEBUG -> AFTER ADDING WEAPON WEAR 42848 µs 13:05 IhrFussel And this is after: 13:05 IhrFussel 2019-08-02 13:43:32: ACTION[Server]: MOB PUNCH DEBUG -> ADDING WEAPON WEAR 161 µs 13:05 IhrFussel 2019-08-02 13:43:32: ACTION[Server]: MOB PUNCH DEBUG -> AFTER ADDING WEAPON WEAR 195 µs 13:05 DS-minetest oops, I got 30-100 µs, not ms, I forgot that us are µs sorry 13:06 IhrFussel Hm...then it's either on my side (which would be very weird since I didn't modify the c++ code at all) or a bug in 0.4.17.1 13:15 IhrFussel Wait maybe this only is a problem when it runs on a remote server? 13:15 * DS-minetest tested in singleplayer 13:16 Krock same results 13:16 Krock (used Host Server) 13:17 IhrFussel Yes but I mean the server is still on your machine 13:17 IhrFussel I run mine remotely...it is in a data center 13:18 IhrFussel It is not its network speed though: 13:18 Krock it's still the same amount of data. even if there's packet loss to re-send, I really doubt there's an issue 13:18 IhrFussel Download: 227.62 Mbit/s 13:18 IhrFussel Upload: 303.27 Mbit/s 13:19 CWz_ Holy 13:19 IhrFussel I need someone with a remote server to run the code and check the times to make sure 13:20 IhrFussel Otherwise I don't get why it would be only a problem on my machine 13:20 * DS-minetest tested with 5.0.1, same results as in 5.1-dev 13:21 IhrFussel Inventory mods shouldn't affect set_wielded_item() correct? 13:24 IhrFussel HOLD ON 13:24 IhrFussel unified_inventory craft grid causes this?? 13:24 IhrFussel I had the craft grid full of stacks and now I took them into 'main' and execution time is 200-300 µs 13:31 rubenwardy IhrFussel: are there any large meta in the inventory? 13:31 rubenwardy oh what 13:31 IhrFussel As soon as I move a stack into the u_i craft grid I get 20-30 ms again 13:32 IhrFussel When the craft grid is empty I get 200-300 µs ... why would u_i cause that? 13:34 IhrFussel Can mods even use a custom craft grid or is it from the engine? 13:35 IhrFussel Even with full main inventory it takes 200-300 µs to execute when nothing is in the craft grid 13:35 IhrFussel But then I move a stack of dirt into it and get 22 ms 13:36 rubenwardy what about the default player inventory 13:36 rubenwardy sfinv 13:36 rubenwardy to see if it's ui related or something else 13:36 rubenwardy Minetest does have core support for craft inventories 13:37 rubenwardy I doubt it's UI's fault, as terrible as it is 13:37 rubenwardy :eyes: 13:37 rubenwardy UI's bloat manifests in other ways 13:37 IhrFussel Can I safely replace u_i with sfinv without giving players free items? 13:38 rubenwardy yes, but they may lose access to items as sfinv isn't compatible with respect to bags and such 13:38 rubenwardy it's fine to do it temporaril 13:42 IhrFussel Just move unified_inventory out of the mods dir? Cause sfinv already exists in MTG and was just disabled by u_i 13:42 rubenwardy yeah 13:42 rubenwardy are you developing live on the server? 13:42 IhrFussel Mostly but with many backups 13:43 rubenwardy I advice setting up a staging server 13:43 rubenwardy bonus points if you use docker 13:44 rubenwardy with docker you can duplicate all the scripts and PHP services too 13:44 rubenwardy CTF has a staging server, but it's not docker unfortunately 13:57 IhrFussel 25 ms with sfinv 13:57 IhrFussel Same behavior...whenever a stack is in the craft grid 14:03 IhrFussel Now could someone use my test mod again while having something in their craft grid and see if that affects the execution time? 14:04 DS-minetest tested, there's a small difference 14:04 DS-minetest it's maybe around double as slow 14:06 IhrFussel Maybe something involving craft grid + network then? Not sure... 14:06 DS-minetest filling the inventory even more makes it worse 14:06 DS-minetest but not 1000 times more worse 14:07 DS-minetest have you already tried reproducing without any other mods, like armor or bags 14:07 DS-minetest ? 14:08 IhrFussel I moved unified_inventory completely out of the mods dir and only had sfinv 14:08 IhrFussel 3d_armor shouldn't affect it cause it's its own page 14:08 DS-minetest but I guess the player inventories are still set in the world 14:09 IhrFussel Bags only store their contents as player meta and the general inventory is just part of the player file 14:09 IhrFussel 3d_armor also stores its contents in player meta 14:11 IhrFussel The inventory slots of the 3d_armor page don't affect the execution time at all 14:12 DS-minetest indeed, 3d armor uses detached inventories (i wonder why…) 14:13 IhrFussel It uses player attributes which are now player meta...I think the detached inventory is only created in on_joinplayer() 14:14 IhrFussel But no matter how much armor I wear (move into 3d_armor page slots) the time is the same 14:14 DS-minetest ui bags use player inv: https://github.com/minetest-mods/unified_inventory/blob/774674d0f5ba2a557ddef30e6002575c6d61a0cc/bags.lua#L53 14:15 DS-minetest have you tried to reproduce in singleplayer yet? 14:16 IhrFussel I'm not sure if I need to since you already told me it doesn't happen then 14:17 DS-minetest yes, but I haven't tested with all your mods 14:17 IhrFussel And it still happens with the default MTG inv 14:17 IhrFussel All mods that depend on u_i haven't been loaded at all 14:17 IhrFussel Since it was missing 14:18 IhrFussel The craft grid comes from the engine I think and it is only this part of the inventor that seems to cause the problem 14:18 IhrFussel inventory* 14:19 DS-minetest the craft is updated when sending the inventory 14:19 Krock oof 14:20 Krock found another possible crash in u_i 14:20 IhrFussel It looks like when I spam move stacks into it or out of it the time is even higher (50-60 ms) 14:21 Krock both set_wielditem and the craft field trigger an inventory re-sending 14:22 DS-minetest btw. why is the whole inventory sent if only one or two item changed? 14:22 DS-minetest +s* 14:22 Krock lack of optimization 14:23 IhrFussel Why does an empty inventory take the same amount of time in my case as a full one? 14:23 DS-minetest maybe it's UpdateCrafting 14:24 IhrFussel Now the craft grid is empty and main is full of stacks -> 192 µs 14:25 IhrFussel Now I move just 1 single dirt into the craft grid -> 17,830 µs 14:25 DS-minetest bogo sort also lacks in optimization 14:26 IhrFussel My guess is the data to send is a lot larger when the engine registers a non-empty craft grid? 14:26 DS-minetest have you tried disabling register_craft in builtin? (set it to function()end) 14:27 IhrFussel I can try that 14:29 IhrFussel You mean 'register_craftitem'? 14:30 IhrFussel I only find that in builtin 14:30 DS-minetest no, register_craft 14:30 DS-minetest yes, add to builtin core.register_craft = function() end 14:30 IhrFussel Ahh that's what you mean 14:36 IhrFussel WHAT 14:37 IhrFussel So it resends all craft registers when calling set_wielded_item() ? 14:37 IhrFussel Cause now I have stacks in my craft grid and get 181 µs 14:39 DS-minetest no, craft registers aren't sent 14:39 DS-minetest so it did actually help? 14:39 IhrFussel Or does the server loop through every single registration whenever you call set_wielded_item()? 14:39 DS-minetest it calles Server::UpdateCrafting 14:40 IhrFussel And what happens in there that it took 30 ms and more before? 14:40 DS-minetest you could now count how often register_craft is used by your mods 14:40 IhrFussel Well I have about 2,000 nodes so a lot for sure 14:41 DS-minetest well, it tries to match a recipe 14:41 DS-minetest of course, we need to update crafting if we set the wielded item XP 14:41 IhrFussel And it returns immediately when the craft grid is empty...makes sense 14:57 IhrFussel What can I do now? 14:57 IhrFussel Idon't want to omit any craft recipes 14:58 IhrFussel Maybe don't call set_wielded_item() for every mob punch and instead use a timer that updates it periodically 14:58 sfan5 open a bug and hope someone optimizes it 14:58 DS-minetest or modify the existing issue 15:01 IhrFussel Should I rename it to 'Server::UpdateCrafting is very unoptimized and lags servers with many recipes'? 15:02 sfan5 if this is more accurate than the old title, sure 15:02 Krock I thought there were optimizations recently 15:16 IhrFussel I guess I'll have to compile the newest dev and bloat it with lots of craft registrations 15:25 IhrFussel Can I add the same craft recipe many times or will that result is false values? 15:26 IhrFussel in* 15:26 rubenwardy jeez, Terasology has a splash screen XD 15:27 sfan5 why don't we? 15:27 VanessaE MT starts fast enough not to need one :P 15:27 VanessaE (at least on my box it does) 15:27 DS-minetest try using main menu music 15:27 VanessaE one thing it could use though is a splash screen for server joins (something to put behind the progress bar) 15:27 rubenwardy Minetest loads a lot faster 15:28 DS-minetest a splash screen would cost time when you want to start your game fast 15:28 VanessaE if a splash is costing you boot-up time, your splash screen code is shity. 15:28 VanessaE shit* 15:28 DS-minetest IhrFussel: idk. but you could get many combinations automatically, use core.registered_items 15:28 rubenwardy sooo muchh laggg 15:29 VanessaE if an image viewer can load and display a 4k x 3k jpeg in milliseconds, MT should be able to as well, were it able to show one at all that is. 15:29 Krock currently trying to implement incremental inventory sending 15:30 IhrFussel DS-minetest, how do you mean? I will only have MTG after compiling and don't want to add other mods just for testing this 15:31 IhrFussel So I hoped I could duplicate recipes for the same item 15:31 DS-minetest idk if you can 15:31 IhrFussel And simulate the 1,000+ I have on my server 15:31 DS-minetest use mesecons_wires, it adds many items 15:32 IhrFussel moreblocks might work too if I add more default nodes to its registration list 15:32 DS-minetest if you have n items, you can easily make n^9 recipes 15:44 IhrFussel Can I somehow count the amount of craft recipes I have now? 15:44 IhrFussel I guess loop through core.registered_crafts 15:47 DS-minetest does such a table exist? 15:47 DS-minetest I don't thinks so... 15:48 DS-minetest you could count by overriding core.register_craft: local old_register_craft = core.register_craft local i = 0 core.register_craft = function(...) i = i + 1 return old_register_craft(...) end 15:52 IhrFussel Nah I simply installed crafting_guide and get 53 pages (downloaded random mods) 15:53 IhrFussel I guess it is indeed fixed in master -> 160 µs with items in craft grid 15:54 DS-minetest why does your server still run on 0.4.17 anyway? 15:58 IhrFussel Cause my iOS users have no MT 5 app yet basically 15:59 IhrFussel https://github.com/minetest/minetest/pull/8097/ is it this PR? Doesn't mention UpdateCrafting though 16:00 IhrFussel Or possibly this one https://github.com/minetest/minetest/pull/8432 16:02 DS-minetest or maybe #8445 16:02 ShadowBot https://github.com/minetest/minetest/issues/8445 -- Prioritise craft recipes by HybridDog 16:05 IhrFussel But the changes then are likely not part of 5.0.1 so I would have to wait for 5.1.0 either way to have those fixes 16:11 IhrFussel Closed my issue 16:55 Krock the single call to "clearItems();" makes this entire incremental inventory sending somewhat complicated 18:21 tumeninodes rubenwardy: Terasology may have a splash screen... but the latest build runs like a dead dawg on my machine... literally unplayable even with all the fancy dodads disabled 18:21 rdococ Is there a way to add a safe version of load/loadstring to luacontrollers? 20:07 Krock dID y0U kN0W? Th3 F0rm5PeC el3MeNt "//[text...]" aCtUally Act5 A5 a ComMenT 20:07 Krock Coincidence? I think not! 20:12 Lone_Wolf https://tenor.com/view/coincidence-think-not-gif-5757189 20:17 Krock that 20:17 Krock we passed the 1 million mark on the forums btw 20:17 Krock came 59 clicks too late 20:38 tumeninodes 1 million tacos? 20:40 tumeninodes 1 million mark, how does that transfer into US$ https://coinmill.com/DEM_USD.html 20:41 Krock 567840.56 USD 20:42 tumeninodes \0/ 20:42 tumeninodes we can has shaders 22:12 rdococ how should I attract attention to an unpopular server that isn't mine, but I think it could be very fun? 22:14 VanessaE is it one of mine? :P 22:18 rdococ no, it's a "king of the hill" one :P 22:19 rdococ feels like it should be up there with CTF, but I guess nobody's really noticed it yet 22:20 VanessaE oh well who cares then... :) 22:22 Lone_Wolf If you have any friends maybe schedule a play event with them 22:22 Lone_Wolf If people see there's people in a server the chances of those people joining increases by about 50% lol 22:23 Lone_Wolf *If a person sees && *the person joining 22:31 rdococ all my friends that are online at the moment are playing on a different server (one which *is* VE's) tho 22:36 Lone_Wolf So you've have to schedule a session at a time other than this then 22:36 Lone_Wolf *you'll