Lazy evaluation of overview info
Callgrind showed recalc_mapseen was three times more expensive (in terms of instructions read) than anything else in our codebase. It was being called in every vision change, re-evaluating the last seen map terrain type for every map location in sight. Remove updating the lastseen info in the vision code, and make a small change so newsym() uses update_lastseentyp. From my short tests, this seems to work correctly ...
This commit is contained in:
@@ -838,8 +838,6 @@ vision_recalc(int control)
|
||||
/* Set the new min and max pointers. */
|
||||
gv.viz_rmin = next_rmin;
|
||||
gv.viz_rmax = next_rmax;
|
||||
|
||||
recalc_mapseen();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user