diff options
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/map/script.c | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 7e605b08f..71c051380 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -5,6 +5,9 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/06/14
* [Improved]:
+ - script_save_mapreg for MapregSQL Saving to display perfomance only in slow
+ queries. [Lance]
+ * [Improved]:
- npc_parse_script to show information and remove duplicated NPCs [Lance]
2006/06/13
* Updated mob_db.sql and item_db.sql to latest. [Skotlex]
diff --git a/src/map/script.c b/src/map/script.c index fa61ab6b1..05cc383c3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -11930,11 +11930,12 @@ static int script_save_mapreg(void) mapregstr_db->foreach(mapregstr_db,script_save_mapreg_strsub,fp); lock_fclose(fp,mapreg_txt,&lock); #else - int perfomance = gettick_nocache(); + int perfomance = (int)time(NULL); mapreg_db->foreach(mapreg_db,script_save_mapreg_intsub); // [zBuffer] mapregstr_db->foreach(mapregstr_db,script_save_mapreg_strsub); - perfomance = (gettick_nocache() - perfomance) / 1000; - ShowInfo("Mapreg saved in %d seconds.\n", perfomance); + perfomance = ((int)time(NULL) - perfomance) / 1000; + if(perfomance > 2) + ShowWarning("Slow Query: MapregSQL Saving @ %d second(s).\n", perfomance); #endif mapreg_dirty=0; return 0; |