Optimize Analyze Endpoint #111

Merged
qimiko merged 24 commits from better-analyze into master 2020-10-01 10:09:08 -03:00
qimiko commented 2020-10-01 03:08:44 -03:00 (Migrated from github.com)

Through the power of some extremely messy code I have managed to heavily speed up the analysis of levels.
Comparisons:
Ocular Miracle:

Trial Optimized Original
1 1.672s 6.186s
2 1.654s 6.851s
3 1.642s 6.403s
4 1.706s 6.546s
5 1.644s 6.272s
A 1.663s 6.452s

Glowy:

Trial Optimized Original
1 0.583s 2.477s
2 0.622s 2.361s
3 0.560s 2.344s
4 0.625s 2.333s
5 0.559s 2.309s
A 0.590s 2.365s

AppleDynamix:

Trial Optimized Original
1 0.061s 0.153s
2 0.062s 0.150s
3 0.058s 0.241s
4 0.060s 0.125s
5 0.060s 0.137s
A 0.060s 0.161s

Comparisons were done using console.time() right after zlib decompression and right before request sending.

In terms of best performance changing commits by what I remember:

  1. Remove some object iterations
  2. Remove requirement on app
  3. Parse object key names along with object parsing
  4. "Flatten" the object id lists

Interestingly, something in here seems to fix #108, but I can't quite tell why, probably just when I did the switch statement stuff.
The git history was spammed in an attempt to better explain what I did, I would definitely recommend squashing if this gets pulled.
I assume things can be optimized much more but this was my work after a couple days and it was starting to get too unreadable :p

Through the power of some _extremely_ messy code I have managed to heavily speed up the analysis of levels. Comparisons: __Ocular Miracle__: Trial | Optimized | Original ------ | ---------- | ---------- 1 | 1.672s | 6.186s 2 | 1.654s | 6.851s 3 | 1.642s | 6.403s 4 | 1.706s | 6.546s 5 | 1.644s | 6.272s A | 1.663s | 6.452s __Glowy__: Trial | Optimized | Original ------ | ---------- | ---------- 1 | 0.583s | 2.477s 2 | 0.622s | 2.361s 3 | 0.560s | 2.344s 4 | 0.625s | 2.333s 5 | 0.559s | 2.309s A | 0.590s | 2.365s __AppleDynamix__: Trial | Optimized | Original ------ | ---------- | ---------- 1 | 0.061s | 0.153s 2 | 0.062s | 0.150s 3 | 0.058s | 0.241s 4 | 0.060s | 0.125s 5 | 0.060s | 0.137s A | 0.060s | 0.161s *Comparisons were done using `console.time()` right after zlib decompression and right before request sending.* In terms of best performance changing commits by what I remember: 1. Remove some object iterations 2. Remove requirement on app 3. Parse object key names along with object parsing 4. "Flatten" the object id lists Interestingly, something in here seems to fix #108, but I can't quite tell why, probably just when I did the switch statement stuff. The git history was spammed in an attempt to better explain what I did, I would definitely recommend squashing if this gets pulled. I assume things can be optimized much more but this was my work after a couple days and it was starting to get too unreadable :p
GDColon commented 2020-10-01 10:09:12 -03:00 (Migrated from github.com)

Wow.

Wow.
Sign in to join this conversation.
No description provided.