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

Improve start-up performance #60

Merged
merged 2 commits into from
Oct 8, 2019
Merged

Improve start-up performance #60

merged 2 commits into from
Oct 8, 2019

Conversation

saarmbruster
Copy link
Contributor

Adding the pages to the Scene Graph the first time they are accessed instead when initializing the CalendarView improves the start-up time significantly, especially if a stage contains multiple instances of the CalendarView. Only the day page must be added at startup because it's the default page.

In my case there is a stage with a TabPane that contains multiple CalendarView instances. Without this change the application freezes for about 10-20 seconds until the window is shown. With this change the window is already shown after less than one second.

The only noticeable drawback of this change is a minimal delay (~1-2 seconds) when switching to the sheet view in the year page for the first time.

@dlemmermann
Copy link
Collaborator

Does this still work nicely with the animations (zoom in / out) when switching between the views?

@saarmbruster
Copy link
Contributor Author

At least on my machine it does. Only the year page animation might sometimes look a bit shorter for the first time you click on the year button. But once the page has been added there is no difference anymore.

@dlemmermann
Copy link
Collaborator

I actually did the same change in another project of mine. Makes total sense.

@dlemmermann dlemmermann merged commit 3c044e2 into dlsc-software-consulting-gmbh:master-11 Oct 8, 2019
@saarmbruster saarmbruster deleted the improve-startup-performance branch October 8, 2019 11:15
@dlemmermann
Copy link
Collaborator

I just ran the HelloCalendarView sample which does not use animation to switch between pages. In this sample the week, month, year pages do not show up anymore. I think this might be related to your change. Could you please look into this?

@saarmbruster
Copy link
Contributor Author

Sure, I will check this.

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