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

How quickly "should" an app start? #1234

Closed
3 tasks done
chlebowa opened this issue May 24, 2024 · 5 comments
Closed
3 tasks done

How quickly "should" an app start? #1234

chlebowa opened this issue May 24, 2024 · 5 comments
Assignees
Labels
core question Further information is requested

Comments

@chlebowa
Copy link
Contributor

chlebowa commented May 24, 2024

An app built with the following data and modules (no filters) takes over a minute to start*, up to a minute and a half with module_specific = TRUE. The data is not particularly large but larger than the typical example data used in NEST packages. Pre-processing takes about 10 seconds. Since modules do not start until viewed, the (near) entirety of app startup taken up by teal itself. I suppose building the filter panel is one of the more time-consuming steps.

*) Measuring in a fresh session, from runnig the script that attaches all necessary packages, creates data and modules, and runs the app, until the moment the notification Data loaded - App fully started up appears on screen.

My question is: at what point should one consider the app taking too long to start? Is there a way to improve startup time?

10 datasets of ~30 MB in total and 13 modules ``` > data ✅︎ verified teal_data object [L] Parent: Bindings: • ADRS: [L] • ADEX: [L] • ADLB: [L] • ADAE: [L] • ADVS: [L] • ADSL: [L] • ADDV: [L] • ADCM: [L] • ADTTE: [L] • ADMH: [L] ```
> sapply(ls(get_env(data)), \(x) dim(get_var(data, x))) 
     ADAE ADCM ADDV ADEX ADLB  ADMH ADRS ADSL ADTTE ADVS
[1,] 1934 9216   11  773 8400 24399 1200  400  1600 8982
[2,]   69   95   62   74  103    75   49   39    50   75
> modules
+ root
 + Summary Tables
  + Data Table
  + Cross Table
 + Data Quality
  + Variable Browser
  + Missing Data
  + Outliers
 + Exploratory Plots
  + Count Barchart
  + Distribution Plot
  + Bivariate Plot
  + Scatter Plot
  + Scatterplot Matrix
 + Statistical Analyses
  + Regression
  + Response Plot
  + Principal Component Analysis

Tagging @gogonzo for visibility.

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@chlebowa chlebowa added the question Further information is requested label May 24, 2024
@m7pr m7pr self-assigned this Jun 5, 2024
m7pr pushed a commit that referenced this issue Jun 7, 2024
Related to #1234.

Update progress bars to improve user experience.

- `modules_datasets` receives optional `progress` argument that accepts
a `Progress` object
- `ui_nested_tabs` and `ui_tabs_with_filters` receive `progress`
argument that accepts a `Progress` object
- rewrote progress bar management in `srv_teal`

Added a large app for testing in `__stress_test.R`, to be removed before
merging.

#### NOTE

Once the module UI is prepared, there is still a delay before the app
starts, so the progress bar can be improved further. So far I was unable
to identify the reason for the delay.
@chlebowa
Copy link
Contributor Author

chlebowa commented Jun 7, 2024

As evidenced by #1236, the creating the filter panel (FilteredData objects) is not the main culprit. Placing progress bars within filter panel ui or server functions did not yield additional information.

@m7pr m7pr removed their assignment Jun 11, 2024
@gogonzo
Copy link
Contributor

gogonzo commented Aug 12, 2024

Tip to the assignee:
Moment when the FilteredData is created for the module should be postponed in the same way as the data-filtering. Creation of FIlteredData should be conditional on:

  • if the data has changed
  • if the tab is active

@gogonzo
Copy link
Contributor

gogonzo commented Nov 13, 2024

This can be closed. We have implemented following:

  • for each module we create a single filteredData object instead of one for every module
  • we postpone calling filter panel, transform module and module to the moment when tab is clicked

@gogonzo gogonzo closed this as completed Nov 13, 2024
@chlebowa
Copy link
Contributor Author

Thank you.

  • for each module we create a single filteredData object instead of one for every module

You mean a singleton instead of one instance per module?

@gogonzo
Copy link
Contributor

gogonzo commented Nov 13, 2024

You mean a singleton instead of one instance per module?

@chlebowa Yup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants