Perfomance of longTermCulling.
When I set "10" to "server/settings/longTermNoLookCullSeconds.ini", I saw log of same position, again and again.
Log is like:
setMapObject( -3, 17, 30) setMapObject( -8, 21, 50) setMapObject( 8, 38, 50) setMapObject( -2, 5, 50) setMapObject( -6, 8, 50) setMapObject( -3, 17, 30) setMapObject( -8, 21, 50) setMapObject( 8, 38, 50) setMapObject( -2, 5, 50) setMapObject( -6, 8, 50) setMapObject( -3, 17, 30) setMapObject( -8, 21, 50) setMapObject( 8, 38, 50) setMapObject( -2, 5, 50) setMapObject( -6, 8, 50)
That means, server calls setMapObject() by same position and objectId, at every steps. Is that good performance for server? db's record keep increasing forever, until server shutdown(relaunching culling is enable and good, that remove db's records.) In last day of before update, db's record is almost fill by ghost record deleted by longTermCulling, and server still repeat deleting ghost.
Maybe good implementation is delete records of db, timeDb, floorDb, floorTimeDb, instead of "setMapObject".
This is logging source code. ` if( curTime - lastLookTime > longTermCullingSeconds ) { // stale
if( noCullItemList.getElementIndex( tileID ) == -1 ) {
// not on our no-cull list
clearAllContained( x, y );
// This is logging by AlecYawata
AppLog::infoF( "setMapObject( %d, %d, %d)", x, y, getTweakedBaseMap(x, y));
// put proc-genned map value in there
setMapObject( x, y, getTweakedBaseMap( x, y ) );
}
}`
BTW, I researching "Animals has gone after longTermCulling bug".
Oh,,, I didnt know, db record can not be deleted.... Very difficult problem.
Yes, but you're right that there's no sense in setting it over and over, once it has been set during culling one time.
I did end up fixing this a bit here:
0da4755c3d8b9aafde19053db9c606746071dc62