Opened 10 years ago

Closed 10 years ago

#2922 closed defect (fixed)

[PATCH] Possible optimization of mirage entities

Reported by: Itms Owned by:
Priority: Should Have Milestone: Alpha 18
Component: UI & Simulation Keywords:
Cc: Patch:

Description

This patch changes the current behavior of mirages when they get back into line of sight. Currently, the mirage entity is destroyed (another one can be re-created later). With this patch, the mirage entity only becomes invisible, and it's updated when the fogged entity gets back into the fog-of-war.

The creation/destruction cost is saved, but I don't know to what extend it will improve performance to change that. Currently running tests about it.

Attachments (1)

mirages.patch (8.9 KB ) - added by Itms 10 years ago.

Download all attachments as: .zip

Change History (3)

by Itms, 10 years ago

Attachment: mirages.patch added

comment:1 by Itms, 10 years ago

After some profiling on a small commands.txt, there is indeed a slight performance gain, especially when the sim update is expensive. This will not counterbalance the cost of having mirages in the game though.

A think that puzzles me a bit is that UpdateVisibilities is a bit more expensive with the patch. The performance gain impacts unlogged parts of the code.

I will run a few tests (serialization, etc.) and commit.

comment:2 by Itms, 10 years ago

Keywords: patch review removed
Resolution: fixed
Status: newclosed

Fixed in r15956.

Note: See TracTickets for help on using tickets.