quakeforge/include/QF
Bill Currie 0360e33a00 [ecs] Add "tree mode" to hierarchies
As I had long suspected, building large hierarchies is fiendishly
expensive (at least O(N^2)). However, this is because the hierarchies
are structured such that adding high-level nodes results in a lot of
copying due to the flattened (breadth-first) layout (which does make for
excellent breadth-first performance when working with a hierarchy).

Using tree mode allows adding new nodes to be O(1) (I guess O(N) for the
size of the sub-tree being added, but that's not supported yet) and
costs only an additional 8 bytes per node. Switching from flat mode to
tree mode is very cheap as only the additional tree-related indices need
to be fixed up (they're almost entirely ignored in flat mode). Switching
from tree to flat mode is a little more expensive as the entire tree
needs to be copied, but it seems to be an O(N) (size of the tree).

With this, building the style editor window went from about 25% to about
5% (and most of that is realloc!), with a 1.3% cost for switching from
tree mode to flat mode.

There's still a lot of work to do (supporting removal and tree inserts).
2023-07-07 14:42:49 +09:00
..
classes Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
ecs [ecs] Add "tree mode" to hierarchies 2023-07-07 14:42:49 +09:00
GL Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
GLSL Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
input [input] Add a shift enum element for numlock 2023-07-02 01:23:28 +09:00
math [math] Add some bit-op functions 2022-01-23 13:47:14 +09:00
plugin [console] Provide control of cursor visibility 2023-06-30 14:57:04 +09:00
progs [qfcc] Add a handle type for engine resources 2023-05-25 10:41:28 +09:00
scene [glsl] Fix a pile of memory leaks 2023-03-05 18:31:30 +09:00
simd [simd] Add unsigned vector types 2023-06-15 09:36:50 +09:00
ui [ui] Add inactive labels and a style api 2023-07-06 19:34:48 +09:00
Vulkan [vulkan] Delay main render resizes by 2s 2023-07-03 23:38:57 +09:00
alloc.h [util] Record allocated blocs for ALLOC 2023-03-05 18:31:30 +09:00
bspfile.h [bspfile] Correct some typos in the documentation 2023-06-29 11:31:24 +09:00
cbuf.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
cdaudio.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
cexpr.h [cexpr] Add support for the bool type 2023-06-26 10:59:16 +09:00
checksum.h Make header protection consistent 2020-02-24 12:21:20 +09:00
clip_hull.h
cmd.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
cmem.h [util] Use mmap/munmap for cmem internal alloc/free 2021-07-12 16:33:47 +09:00
console.h [console] Start work on a debug UI 2023-07-01 20:00:26 +09:00
crc.h Make header protection consistent 2020-02-24 12:21:20 +09:00
csqc.h
cvar.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
darray.h [util] Clean up nested macro temp var names a little 2022-03-31 14:44:51 +09:00
draw.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
dstring.h [build] Autoconfiscate printf format attribute 2021-03-27 19:52:59 +09:00
ecs.h [ecs] Plug a bunch of memory leaks 2023-03-05 22:03:01 +09:00
fbsearch.h [util] Add functions for binary heaps 2021-08-02 12:44:08 +09:00
gib.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
hash.h [util] Free up hash links 2023-03-04 02:07:31 +09:00
heapsort.h [util] Support custom swap function for heapsort 2022-10-31 10:52:03 +09:00
idparse.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
image.h [image] Allow color conversion caches to be cleaned up 2023-03-05 18:31:30 +09:00
info.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
input.h [input] Fix some doxygen breakage 2022-05-19 13:26:45 +09:00
iqm.h [vulkan] Get IQM rendering working 2022-05-07 10:14:22 +09:00
joystick.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
keys.h [dox] Fix up some doxygen issues 2022-04-13 14:17:58 +09:00
link.h Make header protection consistent 2020-02-24 12:21:20 +09:00
listener.h [util] Add a listener object 2021-11-25 13:36:02 +09:00
llist.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
Makemodule.am [build] Ensure generated progs headers get installed 2023-07-02 17:23:44 +09:00
mathlib.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
mdfour.h Clean up after removal of uint32.h 2020-02-29 16:11:07 +09:00
mersenne.h [util] Add mtwist float random number functions 2021-12-24 06:45:13 +09:00
model.h [model] Clean up the brush leaf api a little 2023-06-28 21:45:41 +09:00
modelgen.h Make header protection consistent 2020-02-24 12:21:20 +09:00
msg.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
object.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
pak.h Make header protection consistent 2020-02-24 12:21:20 +09:00
pakfile.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
pcx.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
plist.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
plugin.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
png.h [image] Make WritePNG take settings from tex_t 2022-04-01 01:01:53 +09:00
pqueue.h [util] Clean up nested macro temp var names a little 2022-03-31 14:44:51 +09:00
progs.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
pvsfile.h [qfvis] Write out the fat-pvs file 2021-07-27 20:04:19 +09:00
qargs.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
qdefs.h Make header protection consistent 2020-02-24 12:21:20 +09:00
qendian.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
qtypes.h [qtypes] Support auto in pre-c23 compilers 2023-06-18 17:16:58 +09:00
quakefs.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
quakeio.h [build] Autoconfiscate printf format attribute 2021-03-27 19:52:59 +09:00
render.h [sw] Take advantage of the ECS for edge rendering 2022-10-25 19:36:09 +09:00
riff.h
ringbuffer.h [util] Add atomic ring buffer and automated tests 2022-09-22 09:35:57 +09:00
ruamoko.h [gamecode] Pass registered data pointer to builtins 2022-02-14 12:28:38 +09:00
screen.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
script.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
segtext.h More doxygen tweaks 2022-05-19 13:26:45 +09:00
set.h [set] Add an edge detection iterator 2023-05-26 21:46:34 +09:00
sizebuf.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
skin.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
sound.h [scene] Make entity_t just an entity id for ECS 2022-10-23 22:24:36 +09:00
spritegn.h Make header protection consistent 2020-02-24 12:21:20 +09:00
sys.h [util] Integrate sys_mem into the build 2023-07-04 14:39:36 +09:00
sys_developer.h [sys] Add some developer flags for cache/hunk/zone 2022-06-03 12:04:27 +09:00
teamplay.h [cvar] Make cvars properly typed 2022-04-24 19:15:22 +09:00
tga.h [image] Set texture type for no-load tga images 2022-05-04 13:50:55 +09:00
va.h [util] Make va return const char * 2021-03-29 17:24:30 +09:00
ver_check.h Make header protection consistent 2020-02-24 12:21:20 +09:00
vid.h [vid] Add an api function to control mouse visibility 2023-06-30 14:50:47 +09:00
wad.h Make header protection consistent 2020-02-24 12:21:20 +09:00
wadfile.h Update for doxygen 1.8.16 2020-02-11 15:22:42 +09:00
winding.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00
zone.h Nuke qboolean from orbit 2023-06-13 18:06:11 +09:00