woodruffw / SimpleSession

A window-oriented session manager for Sublime Text.

Home Page:https://packagecontrol.io/packages/SimpleSession

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Corrupted unsaved content

Flashwalker opened this issue · comments

Hello.
SimpleSession have an issue with saving unsaved content.
It pruduces a lot of indents in some cases.
E.g.: I have some unsaved files with long php code in my session, and after saving this session, the resulting session file was about 97 MB, and Sublime was freezed with high cpu load when I tried to load this session.

image

image

image

Thanks for the report. That size and performance blowup happens because SimpleSession saves unsaved content as inline buffer:{contents} objects.

I'm not sure if there's a great alternative to that, other than allowing users to optionally disable unsaved buffers in their sessions. If that's something you'd be interested in, I'd be happy to accept a patch that adds an option controlling that behavior.

(I'm not 100% sure what's up with the indentation -- that might be caused by the extension misusing the insert command.)