microbat icon indicating copy to clipboard operation
microbat copied to clipboard

[Frontend] Lazy Trace loading

Open dingyuchen opened this issue 3 years ago • 2 comments

For programs with a large number of traces in the database, it is possible that loading of traces in the Eclipse UI will be slow and user experience will be affected.

Currently, each call to query traces from the database closes an established connection.

Let's look into:

  • Reducing memory footprint
  • Loading subsets of the trace data as it is needed (pagination or lazy loading)
  • Connection pooling
  • Other UI methods for improving performance (to investigate)

dingyuchen avatar May 24 '21 04:05 dingyuchen

Investigation:

Memory footprint hovers around 0.5gb, max 0.8gb, far below OOM thresholds (1gb). GC is able to handle high occupancy scenarios effectively. Since Microbat is not a read heavy application (1 read per program execution), connection pooling is unlikely to make significant improvements, although reading in parallel is possible. The UI is able to handle steps of up to 80k. Since RW variables will only be needed after clicking a step. Lazy loading of RW variables from the database can improve user experience

dingyuchen avatar Jun 12 '21 04:06 dingyuchen

Memory and CPU sampling data

image image

dingyuchen avatar Jun 12 '21 04:06 dingyuchen