At the moment, the BufferBuilderProcessor re-creates itself every time a spectrogram is re-generated or the source changes.
Additionally, every module the BufferBuilderProcessor depends on is re-instantiated every time a spectrogram is rendered.
This means that whenever the user is paging in the verification grid the a new BufferBuilderProcessor is created for every spectrogram for every page.
I propose that we treat it like the worker.ts, where we keep it active, then provide it new tasks every time it has new work.
We should also provide a lifetime to the processor so that it gets destroyed if not in-use for an extended period of time.
At the moment, the BufferBuilderProcessor re-creates itself every time a spectrogram is re-generated or the source changes. Additionally, every module the BufferBuilderProcessor depends on is re-instantiated every time a spectrogram is rendered.
This means that whenever the user is paging in the verification grid the a new BufferBuilderProcessor is created for every spectrogram for every page.
I propose that we treat it like the
worker.ts
, where we keep it active, then provide it new tasks every time it has new work.We should also provide a lifetime to the processor so that it gets destroyed if not in-use for an extended period of time.