Node search modal freezes when /object_info contains a very large LoadImage input file list
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
The node search / add node modal should remain responsive when typing in the search box, even if the ComfyUI input folder contains a large number of image files.
Ideally, the frontend search should not repeatedly process very large input option lists that are unrelated to searching node names/categories/descriptions.
### Actual Behavior
When opening the add node modal and typing into the search box, the browser UI freezes.
In my case, the browser DevTools also becomes unresponsive after the freeze. The issue is reproducible when `/object_info` is very large because image-loading nodes include the full list of files from the ComfyUI `input` directory.
### Steps to Reproduce
1. Have a large number of image files in the ComfyUI `input` directory.
2. Start ComfyUI.
3. Open the UI in the browser.
4. Double-click the canvas to open the add node modal.
5. Type `l` into the node search input.
6. The page freezes / becomes extremely slow.
### Debug Logs
```powershell
I inspected `/object_info` and found that it was about 100 MB before cleanup.
The largest node definitions were all image-loading nodes, each around 7.1 MB:
LoadAndResizeImage ~7.14 MB
ImageReceiver ~7.14 MB
PromptExtractor //Inspire ~7.14 MB
LG_LoadImage ~7.14 MB
LoadHDRImage ~7.14 MB
LoadImageToBase64 ~7.14 MB
Load image with metadata [Crystools] ~7.14 MB
LoadImage //Inspire ~7.14 MB
LoadImage ~7.14 MB
LoadImageMask ~7.14 MB
```
### Other
_No response_
Contributor guide
Research direction
Start at the frontend entry point for the add-node modal and its search input, then profile typing with a very large /object_info response and input file list. Trace which data is processed during node-name search; done means the modal remains responsive and unrelated large file lists are not repeatedly processed.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100