Page 1 of 2

Massive slowdown when a dungeon level contains a vault

Posted: Sun Oct 31, 2010 6:21 pm
by PowerWyrm
I don't really know what is causing it, but as soon as a vault is generated on a dungeon level, the game becomes horribly slow. Moving, running, checking inventory... and mostly all commands take ages to respond. What is puzzling me is that the problem happens... even if the generated vault is very small (like a 2x2 area with scrolls or potions).

Re: Massive slowdown when a dungeon level contains a vault

Posted: Mon Nov 01, 2010 2:39 am
by darkgod
Humm
Every single time ?
Is this new in beta13?

Re: Massive slowdown when a dungeon level contains a vault

Posted: Mon Nov 01, 2010 11:31 pm
by PowerWyrm
Nope, not new. Been that way since vaults were introduced.
Any special check made on vault terrain in the code?

Re: Massive slowdown when a dungeon level contains a vault

Posted: Wed Nov 03, 2010 12:37 pm
by PowerWyrm
Old Forest with a 2x2 room containing a scroll and a skeleton mage guarding it...
Resting is regenerating mana/hp at 1 per second...
Running doesn't work (walking is faster lol)...
Opening equipment/inventory menu takes 20-30 seconds...

This also happened on a level without a vault :?
There was probably a monster nest on the level... what I don't understand is why the slowdown continues once all monsters on the level are dead...

Any idea how to monitor time consumption? There seems to be a clear bottleneck here...

Re: Massive slowdown when a dungeon level contains a vault

Posted: Wed Nov 03, 2010 1:37 pm
by darkgod
Humm

Yes, when it is slow, press ctrl+alt+shift+p, move around do stuff, well make it go slow, then press ctrl+alt+shift+p again and send me the profiler.log file it should have generated. (DO NOT press ctrl+alt+shift+p after that without restarting or it'll crash)

Re: Massive slowdown when a dungeon level contains a vault

Posted: Thu Nov 04, 2010 1:13 pm
by PowerWyrm
It'll try that tonight and see what comes out...

Re: Massive slowdown when a dungeon level contains a vault

Posted: Thu Nov 04, 2010 7:16 pm
by PowerWyrm
The profiler.log file seems to lack vital info.
stack_level file_defined function_name line_defined current_line local_time total_time
1 =[C] called from profiler_init:-1:=[C] -1 340 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 340 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 340 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 340 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 340 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 232 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 232 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 233 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 233 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 233 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 350 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 350 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 350 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 350 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 351 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 351 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 352 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 352 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 353 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 353 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 419 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 419 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 419 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 419 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 419 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 232 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 232 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 233 0.000000 0.000000
1 =[C] called from profiler_init:-1:=[C] -1 233 0.000000 0.000000

...

Re: Massive slowdown when a dungeon level contains a vault

Posted: Thu Nov 04, 2010 7:32 pm
by darkgod
Ah feck, yes it does not work on the JIT version :/

Re: Massive slowdown when a dungeon level contains a vault

Posted: Sat Nov 06, 2010 12:41 am
by escargot
Dunno if it's directly related with the vault, since until now I haven't noticed any slow down or anything in the presence of vaults.
But now I'm in the sixth level of Tol Falas, theres a huge vault (the square one with doble doors up and down), the dialogs are running slow and apparently if I reveal too much of it's surroundings the game freezes.

Ok, I've just tried going some other way, away from the vault. I found an undead pit, full of wights, skeletons and such, I killed them all, and as I was picking up loot the game froze again.
I could just take the stairs down, but now I'm really intrigued. Maybe the World Destroying Sword of Chaos is inside that vault!

Re: Massive slowdown when a dungeon level contains a vault

Posted: Sat Nov 06, 2010 2:31 pm
by escargot
Well, I had several freezes in level 7th and 8th in Tol Falas, and when I finally reached level 9th there was no Master to be seen. I mapped the complete level and scouted every inch of level.
What can I do? If I leave the level and come after, will he respawn or I should already start thinking about dumping the character?

Any way to make some kind of report or anything so it could help the development of the game?

Re: Massive slowdown when a dungeon level contains a vault

Posted: Sat Nov 06, 2010 2:40 pm
by darkgod
Can you send me the savefile please?

As for the freezes it's probably emperor wights doing that, it's fixed.

Powerwyrm: I'll send you a new exe file in a few minutes so you can run the profiler

Re: Massive slowdown when a dungeon level contains a vault

Posted: Sat Nov 06, 2010 3:14 pm
by darkgod
Ok try the profiler with that please:
http://te4.org/dl/tmp/t-engine-beta13-nojit.exe

Re: Massive slowdown when a dungeon level contains a vault

Posted: Sat Nov 06, 2010 5:08 pm
by Teber2
i'm playing a self-compiled linux version of beta 13. i do not encounter this issue. it's just that saving the game and loading the level tends to be very slow. otherwise the game is fast enough.

posting this on the off chance that it may help.

Re: Massive slowdown when a dungeon level contains a vault

Posted: Sat Nov 06, 2010 5:39 pm
by PowerWyrm
darkgod wrote: Powerwyrm: I'll send you a new exe file in a few minutes so you can run the profiler
Ok I went to old forest level 2 which contained an untouched Honey Tree clearing and ran the profiler while clearing the monsters and resting...
Now what? I got a 100Mb file which I can't put anywhere...

Re: Massive slowdown when a dungeon level contains a vault

Posted: Sat Nov 06, 2010 6:39 pm
by darkgod
gzip/zip/wahetever it, it should comrpess very very well