Open m-nadji-tehrani opened 4 months ago
stats:
Machine specs: Windows 10 AMD Ryzen 3900x, 32 GB ram, RTX 3080
All done at feagi tick rate of 40 hz, from desktop app (browser - firefox). Test controlled by running the FEAGI Bridge in stress test mode.
Websocket Off-> 0.0 ms : FPS ~140 Websocket On power only -> ~ .02 ms - 0.10 ms : FPS ~140 Websocket 100 neuron noise -> ~ 0.6 ms websocket parsing, 0.12 ms test : FPS ~130 Websocket 500 neuron noise -> ~ 1.3 ms websocket parsing, 0.5 ms test parsing ms : FPS ~130 Websocket 1000 neuron noise -> ~ 2.2 ms websocket parsing, 1.0 ms test parsing ms : FPS ~130 Websocket 10000 neuron noise -> ~20 ms websocket parsing, 10.2 ms test parsing ms : FPS ~90 : Web FPS: ~30 Websocket 20000 neuron noise -> ~38.5 ms websocket parsing, 20.6 ms test parsing ms : FPS ~55 : Web FPS: ~10 Websocket 30000 neuron noise -> ~56.5 ms websocket parsing, 30.6 ms test parsing ms : FPS ~40 : Web FPS: no
Note: FPS numbers are misleading, since FPS alternatives between median being high to extremely slow lows, leading to the experience being stuttery
Ultimately, a vast majority of the performance penalty (over 99% at higher neuron counts) came from Websocket parsing and how BM renders the information. Clearly this is our target for optimization
the solution to these performance issues are to be discussed in https://github.com/feagi/brain-visualizer/issues/326
Kevin made a test for having the array be flat. Did some quick performance metrics using the new code (all other variables the same)
Websocket 100 neuron noise -> ~ 0.64 ms websocket parsing, 0.16 ms generate_red_voxel Websocket 500 neuron noise -> ~ 1.23 ms websocket parsing, 0.69 ms generate_red_voxel Websocket 30000 neuron noise -> ~ 51.42 ms websocket parsing, 38.36 ms generate_red_voxel
Performance wise overall this appears to be doing worse (or at least not better, run time variance is a factor).
Bumping this for visibility to ensure any rewrite we do actually does better than this, otherwise there wouldnt be much point to it lol
To help assess the current bottlenecks and priorotize improvements, we need to perform the following performance benchmarks in browser against ( 1. Chrome, 2. Edge, 3. Safari, 4, Firefox)
Important note: Perform all the measurements without having FEAGI in the mix
For each of the following instances, we need to measure the following before and after:
Each measure meant should accompany the following system information:
Measurement scenarios: