Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't render preview if it's disabled #530

Merged
merged 1 commit into from
Oct 8, 2020
Merged

Conversation

rhn
Copy link
Contributor

@rhn rhn commented Oct 8, 2020

I've run into that while editing files on a remote server. The preview widget's HTML is updated every time a couple characters are written, and it blocks the UI. With multiple images inside, the HTML widget tries to access all the resources as files in the current directory, hitting the drive, causing a few seconds of delay when the drive is on a high latency network. When the resources are not present (draft document), it tries again later anyway. That makes typing really annoying.

With this patch, the path to even compute the HTML is cut off, so at least typing works when the preview is disabled.

There's another problem that scrolling causes the same resource access flood when scrolling the preview, but I haven't managed to get to the bottom of it. Unfortunately, strace is limited, and neither gdb nor pdb are any useful :(

@mitya57 mitya57 merged commit fa2abb5 into retext-project:master Oct 8, 2020
@mitya57
Copy link
Member

mitya57 commented Oct 8, 2020

Thanks, merged!

mitya57 pushed a commit that referenced this pull request Oct 8, 2020
mitya57 pushed a commit that referenced this pull request Oct 10, 2020
mitya57 pushed a commit that referenced this pull request Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants