rill icon indicating copy to clipboard operation
rill copied to clipboard

get profiling back to perceived "magical"

Open hamilton opened this issue 3 years ago • 2 comments

Profiling has gotten much slower since May. I think there are some easy solutions to this.

  1. it would be nice if we re-ordered the queue a bit. Right now, we enqueue a bunch of stuff that the user doesn’t need to see immediately (such as top ns). I’m noticing that profiling feels a lot. slower with the new numeric histogram rug plot. It would feel faster if that was the lowest-priority item in the priority queue. So I’m thinking of the following priorities:
  • SummaryProfile – anything that is directly visible in the profiling, e.g. the initial histograms, null counts, cardinality
  • EssentialProfileDetails – top Ns, timestamp viz
  • DeeperProfileDetails – things like the rug plot, which seem to take a bit longer to run.
  1. Along with that, we could prefetch a detail if the user mouses over the profile. This would amount to re-prioritizing the details to be "UserRequestedProfile", which should be above SummaryProfile here. @domoritz suggests also taking a look at premonish, which uses some simple heuristics to determine if a user's mouse is moving toward a DOM element. This would buy us another 200ms to reorder the priority queue, which would likely make it so that the detail views are already calculated.

hamilton avatar Aug 02 '22 15:08 hamilton

We're going to stick to keeping to (1) for this sprint.

hamilton avatar Aug 08 '22 15:08 hamilton

Makes sense. Doing the magic prefetching only gives you marginal benefits and everything else needs to be right first.

domoritz avatar Aug 08 '22 15:08 domoritz