Comfy-Org / Comfy-Org/ComfyUI_frontend
[DevTask] Update serialisation methods
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Current
- `serialize` methods in Litegraph do not perform serialisation; they return an object that may be serialised
- In many cases, properties are simply copied to a new object, retaining collection refs
- In newer usage, many objects are shallow-cloned
- The intent is that the results from these functions are used exclusively for actions such as serialisation by the caller
- This is an ongoing cause of bugs due to (understandable) confusion around what these functions actually do
### Possible solutions
1. Shallow clone everything
- Performance impact on larger graphs
1. Actually serialise
- Strings cannot be easily modified downstream before writing to file
1. ...
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-4724-DevTask-Update-serialisation-methods-2476d73d365081cdab8ffa217dc1dc4c) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.