From 3cdba291242cc1c1684bff7f8242262b1cdeb582 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Sat, 1 Jul 2017 09:58:37 -0700 Subject: Reduce InstanceData footprint The InstanceData type in the rendering subsystem was previously 16 floats which occupied a total of 64 bytes per instance. This meant that for every character or background cell drawn, 64 bytes were sent to the GPU. In the case of a 400x100 cell grid, a total of 2.5MB would be sent. This patch reduces InstanceData's size to 26 bytes, a 60% improvement! Using the above example for comparison, a worst case of 1MB would be transferred. The motivation for this patch comes from macOS. Once the terminal grid would reach a certain size, performance experienced a sharp and dramatic drop (render times would go from ~3ms to ~16ms). I don't want to speculate too much on the underlying issue, but suffice it to say that this patch alleviates the problem in my testing. --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 4709ea67..5191de04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,7 @@ clap = "2.20" fnv = "1.0.5" unicode-width = "0.1.4" arraydeque = "0.2" +half = "1.0" clippy = { version = "0.0.104", optional = true } [target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os="dragonfly", target_os="openbsd"))'.dependencies] -- cgit v1.2.3-54-g00ecf