-
Notifications
You must be signed in to change notification settings - Fork 843
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
Updated Voby to 0.2.0 #1011
Merged
Merged
Updated Voby to 0.2.0 #1011
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
67f6ea5
Updated Voby to 0.2.0
fabiospampinato 4096149
Optimized callback creation a bit
fabiospampinato 3002d91
Updated Voby to 0.2.1
fabiospampinato 7fab1a1
Updated Voby to 0.3.0, which supports template recycling (!)
fabiospampinato 2623703
Updated Voby to v0.3.1
fabiospampinato d81d10e
Updated voby to 0.4.0
fabiospampinato 0f7af94
Optimized benchmark implementation slightly
fabiospampinato c9e767c
Benchmark: slightly optimized className setting
fabiospampinato c0d6d73
Avoiding wrapping rows in observables for no reason
fabiospampinato 3e56eff
Updated Voby to 0.5.0
fabiospampinato File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabiospampinato would the shorter
.splice()
be any slower?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leeoniya I'm not sure, it might depend on where the deletion happens.
I went with slice/concat because I need to make a new array to have the observable detect it as a change so that it can notify all its subscribers. But now that I think about it it would probably be better to expose the method for notifying subscribers, so that I can just edit the array in place and notify them manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure the notification route would have any measurable effect in this specific case, but good to have as option in voby.
for this bench i'd probably leave it written as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might shave 1ms or so, but more importantly it would make the code cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unless it's mutate & notify in some places, and shallow copy in other places :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little messy, but cleaner than what the code looks like now. For the cleanest code when working with non-trivial data structures I think we ideally want to wrap the data structure in a proxy and extract observables out of it automatically, or something like that. I have another library for that but I haven't wired it with this one, it should be doable 🤔