View Issue Details

IDProjectCategoryView StatusLast Update
0004218The Dark ModDesign/Codingpublic29.09.2015 23:35
ReporterSteveL Assigned ToSteveL  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionTDM 2.03 
Target VersionTDM 2.04Fixed in VersionTDM 2.04 
Summary0004218: Long-lived particles slow down map loading
DescriptionParticles get an expensive Monte Carlo simulation at map start to estimate their bounds and to find out what visleafs they could be visible in. Long-lived particles take proportionately longer.

Even short-lived particles like light glares can take up 10% of map load time if the mapper has used a variety.
Additional InformationDiscussed here: http://forums.thedarkmod.com/topic/17362-better-night-skies/page-1#entry376631
TagsNo tags attached.

Activities

SteveL

SteveL

29.09.2015 23:09

reporter   ~0007811

I've tested making the max number of timed samples 250 for each particle stage, instead of testing every frame of the particle's lifetime. Tested with 75 different particle stages. The size results match the older method perfectly.

There's not going to be a big difference in map load time. It turns out that estimating particle sizes is disproportionately slower in a debug build, which I used for profiling. In NHAT forest for example, particle estimations take up 25% of map load time (22.6s) in a debug build, but only 5.5 seconds in a release build. Still, that 5.5s was reduced by 4s using the new method.

It's only long-lived particles that take up a lot of time. I chose NHAT forest because it has leaves in it that last 5 minutes. The effect on maps with only short-lived particles will be negligible.
SteveL

SteveL

29.09.2015 23:16

reporter  

particle_bounds.ods (39,724 bytes)
SteveL

SteveL

29.09.2015 23:16

reporter   ~0007812

Test results attached
SteveL

SteveL

29.09.2015 23:35

reporter   ~0007813

At rev 6543

/trunk/framework/DeclParticle.cpp

Issue History

Date Modified Username Field Change
17.09.2015 12:14 SteveL New Issue
17.09.2015 12:14 SteveL Status new => assigned
17.09.2015 12:14 SteveL Assigned To => SteveL
29.09.2015 23:09 SteveL Note Added: 0007811
29.09.2015 23:10 SteveL Priority high => normal
29.09.2015 23:16 SteveL File Added: particle_bounds.ods
29.09.2015 23:16 SteveL Note Added: 0007812
29.09.2015 23:35 SteveL Note Added: 0007813
29.09.2015 23:35 SteveL Status assigned => resolved
29.09.2015 23:35 SteveL Fixed in Version => TDM 2.04
29.09.2015 23:35 SteveL Resolution open => fixed