From 6cec6e91de4f7490a48a5a145ab3d54efc7fc2c1 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 27 Oct 2013 18:02:20 -0200 Subject: Performance Improvement: hpmeter whenever a character's hp was modified (e.g. damage/heal), clif_hpmeter would look for nearby characters with the PC_PERM_VIEW_HPMETER permission (foreachinarea operation), and since most of the time there isn't such a char nearby it would needlessly consume processing power, now hpmeter is only triggered when there are actual need (when a character with such capabilities is within the map). as little as this may look like, its a mega boost for damage-intensive areas e.g. woe, whereas a single AoE damaging 10 people would, without this, trigger foreachinarea 10 times one very hit. Signed-off-by: shennetsind --- src/map/map.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/map/map.h') diff --git a/src/map/map.h b/src/map/map.h index c8b043acb..6b7d2a630 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -706,6 +706,9 @@ struct map_data { /* ShowEvent Data Cache */ struct questinfo *qi_data; unsigned short qi_count; + + /* speeds up clif_updatestatus processing by causing hpmeter to run only when someone with the permission can view it */ + unsigned short hpmeter_visible; }; /// Stores information about a remote map (for multi-mapserver setups). -- cgit v1.2.3-60-g2f50