View Issue Details

IDProjectCategoryView StatusLast Update
0004686The Dark ModTweakingpublic20.04.2019 14:30
Reporterduzenko Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.07Fixed in VersionTDM 2.07 
Summary0004686: Interaction table
DescriptionInteraction table is big and mostly empty. See if it can be replaced with per-light entity-interaction dictionary.

Forum discussion:
  http://forums.thedarkmod.com/topic/19195-interaction-table/
TagsNo tags attached.

Activities

duzenko

duzenko

27.11.2017 09:22

developer   ~0009707

7315: r_useInteractionTable 2 will use std::map instead of the 2d array (some lights are broken)
stgatilov

stgatilov

28.11.2017 05:12

administrator   ~0009710

Committed changes in svn rev 7318.

Changed interaction table to a hash map with linear probing (see idDenseHash). Now it takes less space than interactions themselves, and works faster than std::map and list traversals. Still a bit slower than plain 2D table on CPU time though.

Also removed cvar r_useInteractionTable.
stgatilov

stgatilov

20.04.2019 14:30

administrator   ~0011748

After looking better at how frontend, I have reignited the linked forum thread.

Also:
1) restored the r_useInteractionTable cvar
2) extracted all the code of interaction table into idInteractionTable class
3) restored the old implementation with one huge light-entity matrix.
4) restored the old implementation without any table at all (list crawling)
See commits 8181-8185.

Right now by default r_useInteractionTable = 2, which is using single hash table (as it was before 8181).
Note that you cannot change cvar during gameplay: there is no code to switch between implementations in runtime, and I don't think it is necessary (given that it won't be simple).

Issue History

Date Modified Username Field Change
27.11.2017 08:28 duzenko New Issue
27.11.2017 08:28 duzenko Status new => assigned
27.11.2017 08:28 duzenko Assigned To => duzenko
27.11.2017 09:22 duzenko Note Added: 0009707
28.11.2017 05:12 stgatilov Note Added: 0009710
02.12.2017 12:42 duzenko Status assigned => resolved
02.12.2017 12:42 duzenko Fixed in Version => TDM 2.07
02.12.2017 12:42 duzenko Resolution open => fixed
20.04.2019 14:26 stgatilov Description Updated
20.04.2019 14:30 stgatilov Note Added: 0011748