Skip to content

Conversation

@markwpearce
Copy link
Collaborator

@markwpearce markwpearce commented Mar 22, 2024

  • Adds metrics for validation (link time and validation time)
  • Refactored namespace linking to make better use of file-level caching
  • Adds significant changes to how validation is performed:
    • Whole scopes are culled from validation if there are not changes that effect that immediate scope
    • Better file culling for name shadowing checks based on changed symbols

Overall, this should cut initial validation time down to about 40%, and should make validation changes in editor much faster...

BEFORE:

% npm run validate

> jellyfin-roku@2.0.5 validate
> npx bsc --copy-to-staging=false --create-package=false

[10:21:34:1920 PM]  Using config file: "/roku/jellyfin-roku_2/bsconfig.json"
[10:21:34:1940 PM]  Loading 0 plugins for cwd "/roku/jellyfin-roku_2"
[10:21:34:2060 PM]  load files
[10:21:34:8270 PM]  load files finished. (620.515ms)
[10:21:34:8270 PM]  Validating project
[10:21:44:6830 PM]  Validating project finished. (9s855.268ms)

AFTER (this is log-level "info"):

% npm run validate

> jellyfin-roku@2.0.5 validate
> npx bsc --copy-to-staging=false --create-package=false --log-level=info

[11:44:09:6900 AM]  Using config file: "/roku/jellyfin-roku_2/bsconfig.json"
[11:44:09:6920 AM]  Loading 0 plugins for cwd "/roku/jellyfin-roku_2"
[11:44:09:7010 AM]  load files
[11:44:10:2920 AM]  load files finished. (590.650ms)
[11:44:10:2920 AM]  Validating project
[11:44:10:6730 AM]    Build component types
[11:44:10:7000 AM]    Build component types finished. (27.114ms)
[11:44:10:7010 AM]    Validate all scopes
[11:44:14:3260 AM]    Validate all scopes finished. (3s624.666ms)
[11:44:14:3260 AM]    Validation Metrics: filesValidated=305, fileValidationTime=276.499ms, fileInfoGenerationTime=103.664ms, programValidationTime=0.308ms, scopesValidated=139, totalLinkTime=600.8ms, totalScopeValidationTime=2s944.775ms, componentValidationTime=0.567ms
[11:44:14:3290 AM]  Validating project finished. (4s37.58ms)
[11:44:14:3300 AM]  Program.getDiagnostics()
[11:44:14:3380 AM]    diagnostic counts: total=54, after filter=50
[11:44:14:3380 AM]  Program.getDiagnostics() finished. (8.233ms)
[11:44:14:3400 AM]  Program.getDiagnostics()
[11:44:14:3430 AM]    diagnostic counts: total=54, after filter=50
[11:44:14:3430 AM]  Program.getDiagnostics() finished. (3.603ms)

@markwpearce markwpearce added this to the v1.0.0 milestone Mar 22, 2024
@markwpearce markwpearce merged commit decfdf3 into release-1.0.0 Mar 22, 2024
@markwpearce markwpearce deleted the v1_validation_metrics branch March 22, 2024 15:09
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.

3 participants