deleteArea() doesn't have good performance

Bug #1226481 reported by Vadim Peretokin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mudlet
Fix Released
Medium
Chris

Bug Description

On the attached map, deleteArea(255) took 10min+ (not exaggerating) on a 3.6Ghz machine, using latest git. The client locked up during this and was unusable.

Is there any way this could be improved?

Revision history for this message
Heiko (koehnheiko) wrote : Re: [Mudlet-makers] [Bug 1226481] [NEW] deleteArea() doesn't have good performance

How large is the map (number of total rooms)?

Am 17.09.2013 10:44, schrieb Vadim Peretokin:
> Public bug reported:
>
> On the attached map, deleteArea(255) took 10min+ (not exaggerating) on a
> 3.6Ghz machine, using latest git. The client locked up during this and
> was unusable.
>
> Is there any way this could be improved?
>
> ** Affects: mudlet
> Importance: Undecided
> Status: New
>
> ** Attachment added: "map"
> https://bugs.launchpad.net/bugs/1226481/+attachment/3825027/+files/map
>
> ** Description changed:
>
> On the attached map, deleteArea(255) took 10min+ (not exaggerating) on a
> - 3.6Ghz machine. The client locked up during this and was unusable.
> + 3.6Ghz machine, using latest git. The client locked up during this and
> + was unusable.
>
> Is there any way this could be improved?
>

Revision history for this message
Vadim Peretokin (vperetokin) wrote :
  • map Edit (10.7 MiB, application/octet-stream)
description: updated
Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: deleteArea() doesn't have good performance / crashes

I actually stopped it myself after 10 minutes. Trying to run this inside a debugger because leaving it on with a timer crashed it, this backtrace happens:

0 QList<int>::node_construct qlist.h 366 0x44a744
1 QList<int>::append qlist.h 495 0x4480cf
2 QMap<int, QString>::keys qmap.h 945 0x5fb57d
3 TRoom::removeAllSpecialExitsToRoom TRoom.cpp 289 0x5f9ebc
4 TRoomDB::__removeRoom TRoomDB.cpp 99 0x656f9e
5 TRoom::~TRoom TRoom.cpp 61 0x5f8fe0
6 TRoomDB::removeRoom TRoomDB.cpp 127 0x6571a0
7 TRoomDB::removeArea TRoomDB.cpp 146 0x6572a4
8 TLuaInterpreter::deleteArea TLuaInterpreter.cpp 6588 0x504589
9 ?? /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 0x7ffff797c23c
10 ?? /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 0x7ffff7986d88
11 ?? /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 0x7ffff797c64d
12 ?? /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 0x7ffff797b8d7
13 ?? /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 0x7ffff797c802
14 lua_pcall /usr/lib/x86_64-linux-gnu/liblua5.1.so.0 0x7ffff7978361
15 TLuaInterpreter::call TLuaInterpreter.cpp 10178 0x512c78
16 TAlias::execute TAlias.cpp 426 0x53b987
17 TAlias::match TAlias.cpp 275 0x53a97f
18 AliasUnit::processDataStream AliasUnit.cpp 281 0x5482ea
19 Host::send Host.cpp 638 0x468f3c
20 TCommandLine::enterCommand TCommandLine.cpp 522 0x531c25
... <More>

summary: - deleteArea() doesn't have good performance
+ deleteArea() doesn't have good performance / crashes
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

TRoom::removeAllSpecialExitsToRoom was called with _id as 9242084

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

That room shouldn't have any special exits:

lua getSpecialExits(9242084)
{}

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

> How large is the map (number of total rooms)?

table.size(getRooms()) says 69076

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

WIth 41k in area 255, and we've only started mapping it out.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Doesn't crash anymore per latest fixes to deleteRoom(https://bugs.launchpad.net/mudlet/+bug/1254404), but is still very slow.

summary: - deleteArea() doesn't have good performance / crashes
+ deleteArea() doesn't have good performance
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

On the attached map above, deleting the 255 area takes 12min after the https://github.com/Mudlet/Mudlet/commit/8d15f2dd90d350dcec0eacc9e5efb2bee165ad67 commit.

Can't test how long it took right before that commit because Mudlet crashes.

Changed in mudlet:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Stephen Lyons (slysven) wrote :

Is this still an issue, IIRC there have been changes in the exits area of the code which may have impacted on this?

Revision history for this message
Vadim Peretokin (vperetokin) wrote : Re: [Bug 1226481] Re: deleteArea() doesn't have good performance

Oh yeah, it is. I wouldn't even try it on your computer - it ran for a good
two hours before I got bored on my 3.6Ghz core.

On Wed, Sep 17, 2014 at 5:16 AM, Stephen Lyons <email address hidden>
wrote:

> Is this still an issue, IIRC there have been changes in the exits area
> of the code which may have impacted on this?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1226481
>
> Title:
> deleteArea() doesn't have good performance
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mudlet/+bug/1226481/+subscriptions
>

Revision history for this message
Vadim Peretokin (vperetokin) wrote :
Download full text (48.8 KiB)

logging data. It is taking 3s to delete a room:

Area removal took 0
room destructor took 3090
Area removal took 0
room destructor took 3121
Area removal took 0
room destructor took 3107
Area removal took 0
room destructor took 3091
Area removal took 0
room destructor took 3094
Area removal took 0
room destructor took 3149
Area removal took 0
room destructor took 3228
Area removal took 0
room destructor took 3146
Area removal took 0
room destructor took 3145
Area removal took 0
room destructor took 3113
Area removal took 0
room destructor took 3105
Area removal took 0
room destructor took 3111
Area removal took 0
room destructor took 3100
Area removal took 0
room destructor took 3107
Area removal took 0
room destructor took 3105
Area removal took 0
room destructor took 3108
Area removal took 0
room destructor took 3102
Area removal took 0
room destructor took 3108
Area removal took 0
room destructor took 3102
Area removal took 0
room destructor took 3108
Area removal took 0
room destructor took 3103
Area removal took 0
room destructor took 3107
Area removal took 0
room destructor took 3102
Area removal took 0
room destructor took 3106
Area removal took 0
room destructor took 3105
Area removal took 0
room destructor took 3122
Area removal took 0
room destructor took 3125
Area removal took 0
room destructor took 3129
Area removal took 0
room destructor took 3105
Area removal took 0
room destructor took 3105
Area removal took 0
room destructor took 3101
Area removal took 0
room destructor took 3104
Area removal took 0
room destructor took 3097
Area removal took 0
room destructor took 3106
Area removal took 0
room destructor took 3099
Area removal took 0
room destructor took 3104
Area removal took 0
room destructor took 3100
Area removal took 0
room destructor took 3106
Area removal took 0
room destructor took 3096
Area removal took 0
room destructor took 3104
Area removal took 0
room destructor took 3096
Area removal took 0
room destructor took 3105
Area removal took 0
room destructor took 3110
Area removal took 0
room destructor took 3113
Area removal took 0
room destructor took 3108
Area removal took 0
room destructor took 3114
Area removal took 0
room destructor took 3107
Area removal took 0
room destructor took 3114
Area removal took 0
room destructor took 3106
Area removal took 0
room destructor took 3114
Area removal took 0
room destructor took 3106
Area removal took 0
room destructor took 3110
Area removal took 0
room destructor took 3116
Area removal took 1
room destructor took 3113
Area removal took 0
room destructor took 3104
Area removal took 0
room destructor took 3112
Area removal took 0
room destructor took 3102
Area removal took 0
room destructor took 3113
Area removal took 0
room destructor took 3104
Area removal took 0
room destructor took 3111
Area removal took 0
room destructor took 3106
Area removal took 1
room destructor took 3109
Area removal took 0
room destructor took 3103
Area removal took 0
room destructor took 3110
Area removal took 0
room destructor took 3101
Area removal took 0
room destr...

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Sorry for the huge log, didn't realise it was that big. Deleting area 255 took 425.933s on Mudlet 2.1 and is still running 3s/room on 3.0 - I think we can consider this a regression.

Changed in mudlet:
milestone: none → 3.0
Changed in mudlet:
status: Confirmed → Fix Committed
assignee: nobody → Chris (chrismudlet)
Changed in mudlet:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.