tbranyen/diffhtml

More efficient garbage collection

tbranyen opened this issue · 0 comments

diffHTML uses a large memory pool for VTrees to ensure efficient diffing. A potential optimization is when and how gc() is called. Currently this method is triggered whenever a transaction completes (rendering finished). For small interactive applications that are re-rendered frequently, it may be smarter to defer and use more of the pool. When dealing with large applications that cannot exceed a certain memory threshold, and may have even reduced the size of the pool, it would be better to sacrifice performance for stability.