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

Requests for each change to the template may cause performance problems and delays? #226

Open
mtmSchoenberger opened this issue Jan 24, 2023 · 6 comments
Labels
bug Something isn't working Review Needed v5 version 5, supports both API and self hosted

Comments

@mtmSchoenberger
Copy link

Describe the bug

Performance Issue
Is it possible to stop already started requests while typing (preview generation)?

Reproduction steps

Steps to reproduce the behavior:
In full screen view (left template right preview) Writing.
Requests go off with every change.

Laravel Version:

8

MailEclipse package version:

3.5.3

Screenshots (if applicable)

image

@mtmSchoenberger mtmSchoenberger added bug Something isn't working Review Needed labels Jan 24, 2023
@mtmSchoenberger mtmSchoenberger changed the title Requests for every change to the template may cause performance problems? Requests for each change to the template may cause performance problems and delays? Jan 24, 2023
@xMrViktorx
Copy link

Because it's a "live preview", I think not possible without requests while typing. If you have performance issues, then don't use it, or use tinymce.

@ReeceM
Copy link
Collaborator

ReeceM commented Jan 25, 2023

Hi @mtmSchoenberger

I'm not aware of the fact it was sending that many request on the preview side of things.

@xMrViktorx the package actually uses tinymce, I am not sure if the comments added are much value ?

@ReeceM
Copy link
Collaborator

ReeceM commented Jan 25, 2023

But it should be possible to reduce the number of requests as that is way too many because that's going to mess with things.

I'm not sure what event is firing it but wrapping the request in a denounce function should work.

@xMrViktorx
Copy link

@ReeceM tinyMCE don't have live preview. He is editing markdown, where SimpleMDE is the default editor, and he is using live preview. And of course if live preview there are requests after every type.

@mtmSchoenberger
Copy link
Author

The problem is that when you type something and then have to wait (depending on server performance) until all the previews have been generated and show.

Would it be possible to send the request only after 1 second of not typing?

@ReeceM
Copy link
Collaborator

ReeceM commented Jan 25, 2023

The problem is that when you type something and then have to wait (depending on server performance) until all the previews have been generated and show.

Would it be possible to send the request only after 1 second of not typing?

The delay after typing is what im suggestion should be implemented. Or maybe less. But we can make use of lodash for that.

@Qoraiche Qoraiche added the v5 version 5, supports both API and self hosted label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Review Needed v5 version 5, supports both API and self hosted
Projects
None yet
Development

No branches or pull requests

4 participants