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

optimizing perf of model loading #3799

Closed
jessfraz opened this issue Sep 5, 2024 · 1 comment · Fixed by #4145
Closed

optimizing perf of model loading #3799

jessfraz opened this issue Sep 5, 2024 · 1 comment · Fixed by #4145
Assignees

Comments

@jessfraz
Copy link
Contributor

jessfraz commented Sep 5, 2024

today this is not bad but there are things that can be improved, especially as we get into larger models:

Screen.Recording.2024-09-05.at.11.45.23.AM.mov

first we need to measure (some ideas):

  1. time to app open
  2. time to code load
  3. time to syntax highlight
  4. time to stream load
  5. time to model load

I like how vscode priotizes time to code load, then does syntax highlighting etc, more info here: https://www.electronjs.org/docs/latest/tutorial/performance

I bet we can make stream load faster too, cc @paultag @iterion

anyways considering thus far we have put zero effort into this i am sure it can be fast as fuck with actual effort

@jessfraz jessfraz added this to the v1 Modeling App Launch milestone Sep 5, 2024
@nadr0 nadr0 self-assigned this Sep 5, 2024
@nadr0
Copy link
Collaborator

nadr0 commented Oct 11, 2024

I'll be opening a PR for this feature.

Here is one of the sample outputs when I run ./out/Zoo\ Modeling\ App-linux-x64/zoo-modeling-app ~/Documents/zoo-modeling-app-projects/default/cube.kcl from a locally packaged binary from yarn tron:package

| name                           | startTime     | delta   | total    |
| ------------------------------ | ------------- | ------- | -------- |
| code/timeOrigin                | 1728674145077 | 0.00    | 0.00     |
| code/willAuth                  | 1728674153072 | 7995.00 | 7995.00  |
| code/willLoadFile              | 1728674153121 | 49.00   | 8044.00  |
| code/didAuth                   | 1728674153423 | 302.00  | 8346.00  |
| code/startInitialEngineConnect | 1728674153472 | 49.00   | 8395.00  |
| code/didLoadFile               | 1728674153487 | 15.00   | 8410.00  |
| code/willSyntaxHighlight       | 1728674153933 | 446.00  | 8856.00  |
| code/didSyntaxHighlight        | 1728674153934 | 1.00    | 8857.00  |
| code/endInitialEngineConnect   | 1728674154410 | 476.00  | 9333.00  |
| code/startExecuteAst           | 1728674154916 | 506.00  | 9839.00  |
| code/endExecuteAst             | 1728674155454 | 538.00  | 10377.00 |
  • time to app open -> didLoadFile because we are loading the /file route.
  • time to code load -> startExecuteAst because this is when the code can actually run
  • time to syntax highlight -> willSyntaxHighlight and didSyntaxHighlight
  • time to stream load -> startInitialEngineConnect and endInitialEngineConnect
  • time to model load -> endExecuteAst

I added a few other marks in the application to help understand time to app open.

It took 8 seconds for my auth :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants