Replies: 1 comment 2 replies
-
I think I found the problem. It has to do with the compare function, which is a closure that holds a reference to an earlier version of the map of sidebar items, which again has a compare function holding a reference to an earlier version of the map and so on. I'll make a short video showing the evidence. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
Open and close pages in the sidebar. Both operations will get slower and slower until they become unusable and freeze Athens. Here is what the profiler says:
As far as I understand, the map operations
assoc
anddissoc
on(:right_sidebar/items app-db)
become inefficient. I believe this a problem with the immutable data structures of CLJS, since(:right_sidebar/items app-db)
contained only two elements, so thatdissoc
should definitely be fast. I suspect that thereduce-kv
andsorted-map-by
calls in:right-sidebar/open-item
somehow modify the internal data structure of the map in a very unfortunate way. Very strange.Demo
https://www.loom.com/share/b74d5768d029432b92f6cc05b02359d7
Athens version
BETA-82 (Electron, Linux)
Beta Was this translation helpful? Give feedback.
All reactions