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

[hxb] Ignore invalidations during display requests #11660

Merged
merged 5 commits into from
May 10, 2024

Conversation

kLabz
Copy link
Contributor

@kLabz kLabz commented May 9, 2024

I tested this branch with all projects I had available, without detecting any issue (at least not any new issue) and got very promising results (see below).

Notes:

  • my computer is a bit slow, so mostly look at timing differences and not raw numbers
  • some framework/user code still need some tweaks to reduce invalidation / macro work
  • most if not all heaps games tested needed a small patch to hxbit letting it run its macros during display requests (but that's also true for other nightlies)

[Shiro project]

  • 4.3.4: not compiling
  • 5.0.0-alpha.1+c325889:
    • hover without invalidation 1~2s
    • completion 4~6s
    • hover with invalidation 4~5s
  • this branch:
    • all requests under 1s

[Shiro project]

  • 4.3.4
    • hover request without invalidation 0.1s
    • completion 5s
    • hover request with invalidation 4s
  • 5.0.0-alpha.1+c325889:
    • hover request without invalidation 1~1.2s
    • completion 4~6s
    • hover request with invalidation 4~5s
  • this branch:
    • all requests under 1s

[Shiro project]

  • 4.3.4: not compiling
  • 5.0.0-alpha.1+c325889:
    • hover request on Game.hx without invalidation 400~700ms
    • completion on Game.hx broken
    • hover request on Game.hx with invalidation broken
  • this branch:
    • hover request on Game.hx without invalidation 160~300ms
    • completion on Game.hx 200~300ms
    • hover request on Game.hx with invalidation 160~300ms

[Personal heaps game] (very similar results on other small[ish] scale projects)

  • 4.3.4
    • hover request without invalidation 30~50ms
    • completion 120~140ms
    • hover request with invalidation 120~160ms
  • 5.0.0-alpha.1+c325889:
    • hover request without invalidation 170~280ms
    • completion 270~380ms
    • hover request with invalidation 250~350ms
  • this branch:
    • hover request without invalidation 80~90ms
    • completion 90~140ms
    • hover request with invalidation 90~140ms

Other "small scale" projects

Smaller projects that tend to have no issues with Haxe 4 and are running diagnostics still have much faster display requests when cache has just been filled (after compilation or diagnostics), though even those can have slightly better timings (with diagnostics disabled at least) when files start to be invalidated.

Misc

  • [Shiro project] - 4.3.4: 20+ seconds; 5.0.0-alpha.1+c325889 and this branch ~15sec including 12+ seconds of macros and rest in typing; something is wrong on user code there
  • [Shiro project] currently not getting completion with nightlies for unrelated issues (and not compiling with 4.3.4)

@kLabz
Copy link
Contributor Author

kLabz commented May 9, 2024

Nice, this check works :)

image

Edit: and after setting development as base branch:
image

👌

@kLabz kLabz force-pushed the poc/display_requests_no_bad_module branch from b95b9cf to 29e5b9e Compare May 9, 2024 12:09
@kLabz kLabz changed the base branch from hxb_sig_deps_continued to development May 9, 2024 12:09
@kLabz kLabz marked this pull request as ready for review May 9, 2024 12:09
@skial skial mentioned this pull request May 9, 2024
1 task
@Simn
Copy link
Member

Simn commented May 10, 2024

This is neat, it's nice that we can do something like that now. Having a two-layer cache like this makes sense to me because we separate the properly cached data from the working data, which should also give a good memory layout for the GC.

I'll have to review the server.ml changes more in-depth because at the very least they duplicate some code.

Also I find reset to be a misleading name for something that merely clears the temp cache.

@kLabz
Copy link
Contributor Author

kLabz commented May 10, 2024

Yeah, that's something I wanted to do pretty much since the beginning but wasn't working well on previous attempts, needed that separate "working data".

Right, I cleaned up a bit, hope it's better like that!

@Simn Simn merged commit ddc0c61 into development May 10, 2024
99 checks passed
@kLabz kLabz deleted the poc/display_requests_no_bad_module branch May 28, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants