Open bshepherdson opened 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.58%. Comparing base (
3729d20
) to head (4748350
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Bump. I've rewritten the implementation of merging original instances with batch-hydrated instances again. I'm building an index that serves both as the indicator which instances should be taken into the batch to be hydrated and which not; and also it enumerates the instances-to-by-hydrated, so that on the second pass of this index, we can extract the hydrated instances by their position in the batch.
The tests are now fixed.
This hadn't been noticed previously since N is generally small, eg. 50 or 60 at most. Working with a Metabase dashboard that loaded 10000 fields (100 each from 100 tables) in a single
select
+hydrate
, I found this was consuming about 3 seconds.The slow path was effectively a very slow
conj
: taking theacc
vector, and then for eachannotated-instances
doing:which is pouring the whole vector into a lazy sequence and back into a vector, once for each instance in the list.
The new version uses a custom transducer to do the same process in O(n) time (and without any seq overhead, as a bonus).