Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics

Dashboard
Notifications
Mark all as read
Meta

Automatic draft-saving plus Sefaria auto-linker leads to the post taking too long to save

+5
−0

If I write up a post on any other Codidact site, the auto-save feature isn't too bad; every time I click around in the text box, or pause for a moment, it briefly autosaves.

If I write up a post on Judaism Codidact that is strictly HTML-based, the same easy-to-use functionality holds.

If I write up a post on Judaism Codidact that uses a source which calls the Sefaria auto-linker is longer than some amount of characters (not sure what the limit is, but it's on the longer side), rather than taking maybe half a second to auto-save, it instead takes closer to 5-10 seconds (depending on post length and how many Sefaria links there are) to auto-save. Whereas in general clicking to a different part of my post does not trigger the auto-save unless I also pause long enough in my typing, if Sefaria Linker is called I can't click out without waiting on the auto-save to do its thing.

This bug holds regardless of browser; I can try to grab a console log if you need it. My theory atm is that the Sefaria linker is called on auto-save for the preview, and the longer the post, the more it struggles to parse the entire post in a smallish amount of time.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

3 comments

GitHub issue tracking this, in which I propose several approaches to what sounds like a general problem and not just the Sefaria linker. Monica Cellio‭ 3 months ago

Can't reproduce this one, even with stupidly long posts. Don't know what's going on there. ArtOfCode‭ 3 months ago

@ArtOfCode Editing works mostly fine on Firefox, but Safari consistently gives me issues. DonielF‭ 3 months ago

1 answer

+2
−0

We weren't able to solve the problem directly (something something Javascript is single-threaded something), but there is now a preference to disable auto-saving, which is a work-around. Go to your user profile and then to the "preferences" tab. The preference is community-specific, so you can disable autosave on only the sites that have slow rendering because of additions like Sefaria or Mathjax.

You can still save drafts; it just won't be automatic. Use the "save draft" button in the editor toolbar to trigger a save:

screenshot, last button circled

Why does this post require moderator attention?
You might want to add some details to your flag.

3 comments

Nice that there's a button! Thank you (pl.)! I wonder whether it should be a per-browser setting, inasmuch as different browsers may perform differently when rendering and saving. msh210‭ 15 days ago

@msh210 I don't know what would be involved in making it per-session as opposed to per-user; all our preferences so far apply to that user in any browser (on that community, unless global). I wonder if a userscript could help in this case, since by definition you run a script in a particular browser on a particular device. On the other hand, not all browsers support userscripts. It might be worth asking a new meta question about this to see what others can contribute (discussion, workarounds). Monica Cellio‭ 15 days ago

Thanks. I haven't time at the moment, and hope to remember to do so later. Anyone interested reading this should feel free to beat me to it. msh210‭ 15 days ago

Sign up to answer this question »

Like any library, this site offers tons of great information, but does not offer personalized, professional advice, and does not take the place of seeking such advice from your rabbi.

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!