keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

Document editor crashes on large documents with   characters

Open fezproof opened this issue 2 years ago • 3 comments

Description

The keystatic website will crash my tab whenever a make an edit to a large document fields or save a particularly large one. This seems to be caused by memory leaks.

There are no errors printed to the browser console or terminal. The page will just error out.

https://github.com/Thinkmill/keystatic/assets/26830309/f5b04d95-40bb-45fa-98b4-debe8d68c726

Specs

Running on the astro runtime just locally using the local storage option. @keystatic/core 0.1.5 @keystatic/astro 1.0.2

fezproof avatar Sep 26 '23 14:09 fezproof

Ok so I did some experiments and it seems to be related to content fields containing the   character. If there are too many it will crash

fezproof avatar Oct 03 '23 09:10 fezproof

Interesting, I haven't seen this before but it sounds like something we can look into.

@fezproof can you share the source code for a document (including a lot of &nbsp) that causes the issue for you so we can try and reproduce it? feel free to link to a file or a gist rather than pasting a large document here

JedWatson avatar Oct 05 '23 12:10 JedWatson

Does this make sense? Happy to clarify anything. Sorry for all the Pathfinder jargon https://gist.github.com/fezproof/258fe62357e8892515f7e5531ce31232

fezproof avatar Oct 06 '23 06:10 fezproof