4 ms·
I don't dispute that UI code needs to be fast overall, but it's still the case that only a small proportion of the code needs to be fast in order for the whole
by rectang 6y ago
I don't dispute that UI code needs to be fast overall, but it's still the case that only a small proportion of the code needs to be fast in order for the whole thing to be fast.
FWIW I worked in the search/database space for a decade and it's the same thing there. There was one time I wrote a lock-free hash table implementation for a registry that needed to be optimized for concurrent access; that code was much harder to write and to understand than the rest of the codebase, but it was justified. Most of the codebase, though, was not performance-critical.
EDIT: I will grant that you still need to think about how to architect the project so that it is optimizable later, which can mean thinking about what needs to be async early on.