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

MathJax kata preview fixes #1508

Merged
merged 5 commits into from May 13, 2024
Merged

MathJax kata preview fixes #1508

merged 5 commits into from May 13, 2024

Conversation

billti
Copy link
Member

@billti billti commented May 10, 2024

This fixes an issue with \braket where it was doubling up the entries. The preview today shows:

image

The fix was to replace physics with braket package. (Not sure why, will log a MathJax bug for that also).

The below two items I was playing with a week ago, but including here:

  • Made the page render one kata at a time, and supports linking to a kata via the URL and forward/back navigation between katas without a page reload. (As on slow machines putting every kata on the one page was too slow)
  • Converted to Preact to match the rest of our code, instead of manipulating DOM elements directly.

Copy link

Benchmark for 40320d1

Click to view benchmark
Test Base PR %
Array append evaluation 344.6±1.87µs 342.2±2.37µs -0.70%
Array literal evaluation 199.3±8.67µs 179.7±2.55µs -9.83%
Array update evaluation 428.8±14.88µs 423.9±4.82µs -1.14%
Core + Standard library compilation 17.5±0.21ms 19.1±0.79ms +9.14%
Deutsch-Jozsa evaluation 5.1±0.18ms 5.1±0.10ms 0.00%
Large file parity evaluation 33.7±0.09ms 33.7±0.61ms 0.00%
Large input file compilation 11.9±0.26ms 13.0±0.55ms +9.24%
Large input file compilation (interpreter) 46.2±1.52ms 49.1±1.28ms +6.28%
Large nested iteration 35.3±1.46ms 33.3±0.52ms -5.67%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1550.9±34.71µs 1557.7±78.21µs +0.44%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.8±0.12ms 8.0±0.07ms +2.56%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1423.8±81.01µs 1411.5±35.13µs -0.86%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 27.3±0.49ms 27.6±0.23ms +1.10%
Teleport evaluation 86.8±3.73µs 86.6±4.42µs -0.23%

@Manvi-Agrawal
Copy link
Contributor

Made the page render one kata at a time, and supports linking to a kata via the URL and forward/back navigation between katas without a page reload.

Thanks @billti for doing this to improve dev productivity. I was really wishing this feature last week when working on migration of "Superdense Coding" kata because it was slightly annoying to go down and select the kata each time with local changes :)

@tcNickolas
Copy link
Member

Looks great! Now I can use this preview on my slow machine :-)

@billti billti enabled auto-merge May 13, 2024 18:31
@billti billti added this pull request to the merge queue May 13, 2024
Merged via the queue into main with commit 6322628 May 13, 2024
16 checks passed
@billti billti deleted the billti/kata-preview-improvements branch May 13, 2024 19:06
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.

None yet

5 participants