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

Make session share button + persist to local storage #72

Merged
merged 22 commits into from
Nov 12, 2024

Conversation

sverhoeven
Copy link
Collaborator

@sverhoeven sverhoeven commented Oct 28, 2024

Refs #61
Fixes #20

Moves ShareButton from experiment to whole app

TODO

  • Handle inline todos
  • implement code for failing e2e test

@sverhoeven
Copy link
Collaborator Author

Uploading big experiment twice causes very slow setExperiments calls

Running reference: 17.72705078125 ms
store.ts:80 Store reference output: 2383.742919921875 ms
store.ts:91 Running permutation 0: 12.35986328125 ms
store.ts:100 Store permutation 0 output: 2659.326904296875 ms
store.ts:91 Running permutation 1: 14.31591796875 ms
store.ts:100 Store permutation 1 output: 2904.865966796875 ms
store.ts:91 Running permutation 2: 11.546142578125 ms
store.ts:100 Store permutation 2 output: 2997.45703125 ms
store.ts:91 Running permutation 3: 12.759033203125 ms
store.ts:100 Store permutation 3 output: 3252.910888671875 ms
store.ts:91 Running permutation 4: 11.48193359375 ms
store.ts:100 Store permutation 4 output: 3640.27001953125 ms
store.ts:91 Running permutation 5: 14.137939453125 ms
store.ts:100 Store permutation 5 output: 4071.215087890625 ms
store.ts:91 Running permutation 6: 19.54296875 ms
store.ts:100 Store permutation 6 output: 5085.98583984375 ms
store.ts:91 Running permutation 7: 21.6650390625 ms
store.ts:100 Store permutation 7 output: 5598.215087890625 ms
store.ts:91 Running permutation 8: 12.47607421875 ms
store.ts:100 Store permutation 8 output: 5926.547119140625 ms
store.ts:91 Running permutation 9: 14.406005859375 ms
store.ts:100 Store permutation 9 output: 6255.922119140625 ms
store.ts:91 Running permutation 10: 16.05322265625 ms
store.ts:100 Store permutation 10 output: 6309.295166015625 ms
store.ts:91 Running permutation 11: 6.177978515625 ms
store.ts:100 Store permutation 11 output: 8132.091064453125 ms
store.ts:91 Running permutation 12: 7.419921875 ms
store.ts:100 Store permutation 12 output: 8185.593017578125 ms
store.ts:91 Running permutation 13: 21.483154296875 ms

Fixing by storing outputs outside store.

@sverhoeven
Copy link
Collaborator Author

To test making too big share link I first had to make a big config, for that I made a sweep button.

localhost_3000_ (3)
localhost_3000_ (4)

@sverhoeven
Copy link
Collaborator Author

Uploading big experiment twice causes very slow setExperiments calls

Running reference: 17.72705078125 ms
store.ts:80 Store reference output: 2383.742919921875 ms
store.ts:91 Running permutation 0: 12.35986328125 ms
store.ts:100 Store permutation 0 output: 2659.326904296875 ms
store.ts:91 Running permutation 1: 14.31591796875 ms
store.ts:100 Store permutation 1 output: 2904.865966796875 ms
store.ts:91 Running permutation 2: 11.546142578125 ms
store.ts:100 Store permutation 2 output: 2997.45703125 ms
store.ts:91 Running permutation 3: 12.759033203125 ms
store.ts:100 Store permutation 3 output: 3252.910888671875 ms
store.ts:91 Running permutation 4: 11.48193359375 ms
store.ts:100 Store permutation 4 output: 3640.27001953125 ms
store.ts:91 Running permutation 5: 14.137939453125 ms
store.ts:100 Store permutation 5 output: 4071.215087890625 ms
store.ts:91 Running permutation 6: 19.54296875 ms
store.ts:100 Store permutation 6 output: 5085.98583984375 ms
store.ts:91 Running permutation 7: 21.6650390625 ms
store.ts:100 Store permutation 7 output: 5598.215087890625 ms
store.ts:91 Running permutation 8: 12.47607421875 ms
store.ts:100 Store permutation 8 output: 5926.547119140625 ms
store.ts:91 Running permutation 9: 14.406005859375 ms
store.ts:100 Store permutation 9 output: 6255.922119140625 ms
store.ts:91 Running permutation 10: 16.05322265625 ms
store.ts:100 Store permutation 10 output: 6309.295166015625 ms
store.ts:91 Running permutation 11: 6.177978515625 ms
store.ts:100 Store permutation 11 output: 8132.091064453125 ms
store.ts:91 Running permutation 12: 7.419921875 ms
store.ts:100 Store permutation 12 output: 8185.593017578125 ms
store.ts:91 Running permutation 13: 21.483154296875 ms

Fixing by storing outputs outside store.

const outputs = [] is now used everywhere, still have some performance problems see

// TODO figure out why duplicating experiment with permutation sweep takes to so long
// slowest item now is updating progress in running
// as it most likely triggering a rerender of the most of the app
// if I remove the timeseries analysis it is much faster

@sverhoeven
Copy link
Collaborator Author

Fixes #63

localhost_3000_ (5)

or when a experiment is present the + button will show in dialog.

@sverhoeven sverhoeven marked this pull request as ready for review November 11, 2024 12:27
@sverhoeven sverhoeven requested a review from Peter9192 November 11, 2024 12:27
@sverhoeven
Copy link
Collaborator Author

Rollback outputs premature optimization

Copy link
Member

@Peter9192 Peter9192 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed interactively

@sverhoeven
Copy link
Collaborator Author

Hmm, with outputs back in store, adding the permutation sweep, the ui is slower. Duplicating experiment is even slower.
Might want to revert aac745a to improve performance a bit.

@sverhoeven sverhoeven merged commit 3ccedbd into main Nov 12, 2024
4 checks passed
@Peter9192 Peter9192 mentioned this pull request Nov 25, 2024
@sverhoeven sverhoeven deleted the 61-persist-app-state branch January 21, 2025 14:18
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.

Save app state in local storage
2 participants