You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to display very large objects in the context sidebar, the runtime seems to struggle (100% cpu usage and sometimes freezes)
Expected Behavior
While I don't expect to be able to view very large objects in the sidebar I would expect the Node-RED runtime to handle this more gracefully. For arrays it doesn't seem to be an issue as the array is cutoff at some point.
Steps To Reproduce
See attached flow.
Example flow
[{"id":"0dccdcd830997e99","type":"group","z":"aa4dd3f04c2a8de7","name":"1. generate very large object (wait for debug to print to confirm it's done)","style":{"label":true},"nodes":["47bc59b7809b8700","a71559dd2e51bcee","cf8e729dcfa39f3c"],"x":174,"y":159,"w":552,"h":82},{"id":"47bc59b7809b8700","type":"inject","z":"aa4dd3f04c2a8de7","g":"0dccdcd830997e99","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"id\":0,\"name\":\"Elijah\",\"city\":\"Austin\",\"age\":78,\"friends\":[{\"name\":\"Michelle\",\"hobbies\":[\"Watching Sports\",\"Reading\",\"Skiing & Snowboarding\"]},{\"name\":\"Robert\",\"hobbies\":[\"Traveling\",\"Video Games\"]}]},{\"id\":1,\"name\":\"Noah\",\"city\":\"Boston\",\"age\":97,\"friends\":[{\"name\":\"Oliver\",\"hobbies\":[\"Watching Sports\",\"Skiing & Snowboarding\",\"Collecting\"]},{\"name\":\"Olivia\",\"hobbies\":[\"Running\",\"Music\",\"Woodworking\"]},{\"name\":\"Robert\",\"hobbies\":[\"Woodworking\",\"Calligraphy\",\"Genealogy\"]},{\"name\":\"Ava\",\"hobbies\":[\"Walking\",\"Church Activities\"]},{\"name\":\"Michael\",\"hobbies\":[\"Music\",\"Church Activities\"]},{\"name\":\"Michael\",\"hobbies\":[\"Martial Arts\",\"Painting\",\"Jewelry Making\"]}]},{\"id\":2,\"name\":\"Evy\",\"city\":\"San Diego\",\"age\":48,\"friends\":[{\"name\":\"Joe\",\"hobbies\":[\"Reading\",\"Volunteer Work\"]},{\"name\":\"Joe\",\"hobbies\":[\"Genealogy\",\"Golf\"]},{\"name\":\"Oliver\",\"hobbies\":[\"Collecting\",\"Writing\",\"Bicycling\"]},{\"name\":\"Liam\",\"hobbies\":[\"Church Activities\",\"Jewelry Making\"]},{\"name\":\"Amelia\",\"hobbies\":[\"Calligraphy\",\"Dancing\"]}]},{\"id\":3,\"name\":\"Oliver\",\"city\":\"St. Louis\",\"age\":39,\"friends\":[{\"name\":\"Mateo\",\"hobbies\":[\"Watching Sports\",\"Gardening\"]},{\"name\":\"Nora\",\"hobbies\":[\"Traveling\",\"Team Sports\"]},{\"name\":\"Ava\",\"hobbies\":[\"Church Activities\",\"Running\"]},{\"name\":\"Amelia\",\"hobbies\":[\"Gardening\",\"Board Games\",\"Watching Sports\"]},{\"name\":\"Leo\",\"hobbies\":[\"Martial Arts\",\"Video Games\",\"Reading\"]}]},{\"id\":4,\"name\":\"Michael\",\"city\":\"St. Louis\",\"age\":95,\"friends\":[{\"name\":\"Mateo\",\"hobbies\":[\"Movie Watching\",\"Collecting\"]},{\"name\":\"Chris\",\"hobbies\":[\"Housework\",\"Bicycling\",\"Collecting\"]}]},{\"id\":5,\"name\":\"Michael\",\"city\":\"Portland\",\"age\":19,\"friends\":[{\"name\":\"Jack\",\"hobbies\":[\"Painting\",\"Television\"]},{\"name\":\"Oliver\",\"hobbies\":[\"Walking\",\"Watching Sports\",\"Movie Watching\"]},{\"name\":\"Charlotte\",\"hobbies\":[\"Podcasts\",\"Jewelry Making\"]},{\"name\":\"Elijah\",\"hobbies\":[\"Eating Out\",\"Painting\"]}]},{\"id\":6,\"name\":\"Lucas\",\"city\":\"Austin\",\"age\":76,\"friends\":[{\"name\":\"John\",\"hobbies\":[\"Genealogy\",\"Cooking\"]},{\"name\":\"John\",\"hobbies\":[\"Socializing\",\"Yoga\"]}]},{\"id\":7,\"name\":\"Michelle\",\"city\":\"San Antonio\",\"age\":25,\"friends\":[{\"name\":\"Jack\",\"hobbies\":[\"Music\",\"Golf\"]},{\"name\":\"Daniel\",\"hobbies\":[\"Socializing\",\"Housework\",\"Walking\"]},{\"name\":\"Robert\",\"hobbies\":[\"Collecting\",\"Walking\"]},{\"name\":\"Nora\",\"hobbies\":[\"Painting\",\"Church Activities\"]},{\"name\":\"Mia\",\"hobbies\":[\"Running\",\"Painting\"]}]},{\"id\":8,\"name\":\"Emily\",\"city\":\"Austin\",\"age\":61,\"friends\":[{\"name\":\"Nora\",\"hobbies\":[\"Bicycling\",\"Skiing & Snowboarding\",\"Watching Sports\"]},{\"name\":\"Ava\",\"hobbies\":[\"Writing\",\"Reading\",\"Collecting\"]},{\"name\":\"Amelia\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Daniel\",\"hobbies\":[\"Skiing & Snowboarding\",\"Martial Arts\",\"Writing\"]},{\"name\":\"Zoey\",\"hobbies\":[\"Board Games\",\"Tennis\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]},{\"id\":9,\"name\":\"Liam\",\"city\":\"New Orleans\",\"age\":33,\"friends\":[{\"name\":\"Chloe\",\"hobbies\":[\"Traveling\",\"Bicycling\",\"Shopping\"]},{\"name\":\"Evy\",\"hobbies\":[\"Eating Out\",\"Watching Sports\"]},{\"name\":\"Grace\",\"hobbies\":[\"Jewelry Making\",\"Yoga\",\"Podcasts\"]}]}]","payloadType":"json","x":270,"y":200,"wires":[["a71559dd2e51bcee"]]},{"id":"a71559dd2e51bcee","type":"function","z":"aa4dd3f04c2a8de7","g":"0dccdcd830997e99","name":"function 1","func":"const largeObject = {}\nfor (let i = 0 ; i < 100000 ; i++) {\n largeObject[i] = RED.util.cloneMessage(msg.payload)\n}\nglobal.set('largeObject', largeObject )\nreturn msg","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":200,"wires":[["cf8e729dcfa39f3c"]]},{"id":"cf8e729dcfa39f3c","type":"debug","z":"aa4dd3f04c2a8de7","g":"0dccdcd830997e99","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":620,"y":200,"wires":[]},{"id":"be9bd31c68c1a669","type":"group","z":"aa4dd3f04c2a8de7","name":"2. print length to confirm we have everything","style":{"label":true},"nodes":["2f7df8e59f2c0485","db077b4a6111ffd5","8898b29a09f5a782"],"x":164,"y":279,"w":642,"h":82},{"id":"2f7df8e59f2c0485","type":"inject","z":"aa4dd3f04c2a8de7","g":"be9bd31c68c1a669","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":320,"wires":[["8898b29a09f5a782"]]},{"id":"db077b4a6111ffd5","type":"debug","z":"aa4dd3f04c2a8de7","g":"be9bd31c68c1a669","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":700,"y":320,"wires":[]},{"id":"8898b29a09f5a782","type":"function","z":"aa4dd3f04c2a8de7","g":"be9bd31c68c1a669","name":"function 2","func":"const largeObject = global.get('largeObject')\nnode.warn(Object.keys(largeObject).length)\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":320,"wires":[["db077b4a6111ffd5"]]},{"id":"6e04e7ac605f4939","type":"group","z":"aa4dd3f04c2a8de7","name":"3. Confirm we can access individual entries","style":{"label":true},"nodes":["deeb6cb3657ae4c8","57876c04a4fa5d16","dbf59859b202c171"],"x":154,"y":399,"w":482,"h":122},{"id":"deeb6cb3657ae4c8","type":"inject","z":"aa4dd3f04c2a8de7","g":"6e04e7ac605f4939","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"largeObject[\"1000\"]","payloadType":"global","x":310,"y":440,"wires":[["57876c04a4fa5d16"]]},{"id":"57876c04a4fa5d16","type":"debug","z":"aa4dd3f04c2a8de7","g":"6e04e7ac605f4939","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":440,"wires":[]},{"id":"dbf59859b202c171","type":"inject","z":"aa4dd3f04c2a8de7","g":"6e04e7ac605f4939","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"largeObject[\"10000\"]","payloadType":"global","x":320,"y":480,"wires":[["57876c04a4fa5d16"]]},{"id":"20e8b9c7f6dcc57b","type":"group","z":"aa4dd3f04c2a8de7","name":"4. Navigate to the context side bar and attempt reloading the Global section","style":{"label":true},"nodes":[],"x":154,"y":559,"w":483,"h":40}]
Environment
Node-RED version: 3.1.9
Node.js version: 18
npm version:
Platform/OS: Mac OS
Browser: Safari
The text was updated successfully, but these errors were encountered:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
Need to look at how the API is returning the data and what options we have to slice it better. This is potentially breaking at the API level so need to consider how to proceed.
Current Behavior
When attempting to display very large objects in the context sidebar, the runtime seems to struggle (100% cpu usage and sometimes freezes)
Expected Behavior
While I don't expect to be able to view very large objects in the sidebar I would expect the Node-RED runtime to handle this more gracefully. For arrays it doesn't seem to be an issue as the array is cutoff at some point.
Steps To Reproduce
See attached flow.
Example flow
Environment
The text was updated successfully, but these errors were encountered: