-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[BUG] Very slow initialization #186
Comments
@iamjoshua Thank you for issue. Please show up your initial pane settings. |
I have no specific settings in mind. The default examples that you provide exhibit the behavior. Adding/Removing elements from the DOM will always be slower than toggling a css class. For performance, showing/hiding should be the default behavior instead of init/destroying. |
@iamjoshua Just pushed Please give a feedback, whether you are using |
Yes I was using the fitHeight option. The new version does seem a bit faster, but there is still a noticeable delay. I only have text in the pane so it's hard to see why there should be any delay. I still don't understand why you are destroying the pane upon dismiss by default. The default should be to hide the pane without destroying it. Or at least it would be a good option to have something like { onDismissType: 'hide' || 'destroy' } To reiterate the original point, I can set the onBackdropTap event to hide the pane, which keeps it from being destroyed ensuring a fast reopen in the future. But when dragging the pane closed it seems to destroy the pane by default instead of simply hiding it. Is there any way currently to simply hide the pane on dragging to close? |
@iamjoshua Could you please, make some demo/video to demonstrate a delay ? |
That level of DOM manipulation is always going to be slower than changing a class/style to hide/show. I understand the need to clean up after using a temporary pane, but I'd have to imagine that a major use case for panes is for permanent UI elements. Your own demo shows the issue: https://output.jsbin.com/fuhisey |
@iamjoshua Big Thanks for your effort, and I'm eventually come out with solution and now initialization reduced from |
Describe the bug
When first initializing a pane, there is a delay that exceeds the threshold typical for "fast" UX which feels quite sluggish. Hiding a pane instead of destroying it will allow for subsequent presentations to be noticeably faster. But even if a pane is initialized prior to being shown, there is still an initial delay. And it seems that the default behavior for the 'onDidDismiss' event triggered by dragging events destroys the pane. I don't see an option for hiding instead of destroying on the default dismiss event.
To Reproduce
Steps to reproduce the behavior:
Any of the demos.
Expected behavior
The text was updated successfully, but these errors were encountered: