3 ms·
Comment if you can: We've got an app that is pretty slow. Partially the fault of the front-end doing a lot of synchronous promises. But on the backend we have
by hiram112 9y ago
Comment if you can:
We've got an app that is pretty slow. Partially the fault of the front-end doing a lot of synchronous promises.
But on the backend we have a lot of calls where we are getting a list off foos from the DB, then spinning through for loops and making one or two synchronous calls to other microseconds to fill in the details.
I hated algorithms - but this is O(n^2) and we could cut it down to 2n -> O(n) by spinning off the fir loop to futures.
This is java using completable futures with whatever thread pool the generic executor creates.
Any issues?