Sorry for the poor wording.
I'll go with an example : I took a fairly small image and added a hex grid. The file size went from ~156k to over 1,2g.
I thought it might be because the "paths" were left behind or something, but the script does appear to delete them after tracing the lines.
That could be some residual history with all the deletes and stuff. Are they still that size after you close them?
Actually, I just ran a quick test and the script DOES add quite a bit of memory ( test went from 7.4mb to 437mb for a 676 × 436 image at 150 ppi) to the working file. Clearing the history got the size back down to 7.6mb. I would suggest that placing the grid be done as a first thing after opening the document or after a save in order to make sure that you do not clear something that you might want to backtrack on. I am not sure if you can delete specific actions from the history.....
Aah! Memory usage, not filesize. Thanks Korash, now I understand.
That can be fixed, as I've done it for other scripts I've written, I just never considered this one to be that memory intense.