Anonymous | Login | 2024-11-21 15:54 UTC |
My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0003028 | VCMI | AI - Adventure Map | public | 2018-12-16 13:48 | 2018-12-30 20:41 | ||||||||
Reporter | Warmonger | ||||||||||||
Assigned To | Nullkiller | ||||||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||||||
Status | resolved | Resolution | fixed | ||||||||||
Platform | OS | OS Version | |||||||||||
Product Version | 1.next | ||||||||||||
Target Version | Fixed in Version | 1.next | |||||||||||
Summary | 0003028: Optimize CGameInfoCallback::getPlayerTeam | ||||||||||||
Description | According to MSVS 2015 profiler, this little function uses 2% of all client time. However, it has not much use, since player teams don't change often (if at all). Just make fixed player->team field. Maybe update it only when player leaves the game, if ever. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | Issue 3028.png [^] (48,525 bytes) 2018-12-30 20:22
| ||||||||||||
Notes | |
(0007698) AVS (administrator) 2018-12-16 17:40 |
getPlayerTeam could be optimized, but problem is not in getPlayerTeam itself, but in that it is called way to often (mostly from tile visibility checks). AI should cache FoW map locally and do not retrive it from callback every time. |
(0007701) AVS (administrator) 2018-12-30 19:40 |
Optimized in https://github.com/vcmi/vcmi/pull/528 [^] |
(0007702) Warmonger (administrator) 2018-12-30 20:21 edited on: 2018-12-30 20:24 |
Indeed, but you actually had to optimize 2 different AI functions where this call is used, and the list is not exhaustive. At least these were 2 main callers. (The lambda in the screenshot comes from ExplorationNewPoint()) |
(0007703) AVS (administrator) 2018-12-30 20:41 |
See the PR, and my review. I`ve marked all known bottlenecks (I have profiler data too) |
Issue History | |||
Date Modified | Username | Field | Change |
2018-12-16 13:48 | Warmonger | New Issue | |
2018-12-16 17:40 | AVS | Note Added: 0007698 | |
2018-12-30 19:40 | AVS | Note Added: 0007701 | |
2018-12-30 19:40 | AVS | Status | new => resolved |
2018-12-30 19:40 | AVS | Fixed in Version | => 1.next |
2018-12-30 19:40 | AVS | Resolution | open => fixed |
2018-12-30 19:40 | AVS | Assigned To | => Nullkiller |
2018-12-30 20:21 | Warmonger | Note Added: 0007702 | |
2018-12-30 20:22 | Warmonger | File Added: Issue 3028.png | |
2018-12-30 20:24 | Warmonger | Note Edited: 0007702 | View Revisions |
2018-12-30 20:41 | AVS | Note Added: 0007703 |
Copyright © 2000 - 2024 MantisBT Team |