langflow icon indicating copy to clipboard operation
langflow copied to clipboard

progressive browser memory growth

Open ZhangTomLiang opened this issue 1 month ago • 0 comments

Bug Description

I'm experiencing significant memory consumption issues in my application when storing a large state tree in Zustand. My state contains around 200+ nodes with complex nested structures, and I've noticed that browser memory keeps increasing continuously.

Problem: Browser memory usage grows steadily and doesn't seem to be properly garbage collected.

Questions:

  1. Are there any built-in optimization strategies in Zustand for handling large state objects?
  2. What are the recommended patterns for managing large datasets (200+ complex objects) in Zustand?
  3. Are there any known memory leak issues or garbage collection considerations I should be aware of?
  4. Would using middleware like persist help or worsen memory usage in this scenario?

Any guidance or best practices would be greatly appreciated!

Reproduction

Drag and drop 200+ components onto the canvas and build components

Expected behavior

After opening the frontend page in the browser and completing the build process, memory usage should not continuously increase.

Who can help?

@Cristhianzl @lucaseduoli @igorrCarvalho

Operating System

mac m1

Langflow Version

1.14

Python Version

None

Screenshot

No response

Flow File

No response

ZhangTomLiang avatar Nov 14 '25 09:11 ZhangTomLiang