Repository navigation
lib/fs: Optimize WindowsInvalidFilename - #8687
Merged
Merged
Conversation
Replaced strings.Split with the new strings.Cut, which doesn't allocate. name old time/op new time/op delta WindowsInvalidFilenameValid-8 154ns ± 2% 89ns ± 0% -42.09% (p=0.000 n=10+9) WindowsInvalidFilenameNUL-8 124ns ± 2% 124ns ± 1% ~ (p=0.371 n=8+10) name old alloc/op new alloc/op delta WindowsInvalidFilenameValid-8 16.0B ± 0% 0.0B -100.00% (p=0.000 n=10+10) WindowsInvalidFilenameNUL-8 19.0B ± 0% 3.0B ± 0% -84.21% (p=0.000 n=10+10) name old allocs/op new allocs/op delta WindowsInvalidFilenameValid-8 1.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10) WindowsInvalidFilenameNUL-8 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.000 n=10+10)
Member
|
This will have to wait because we're still targeting 1.18 until 1.20 comes out. |
Member
Seems to be a go1.18 change - CI for that version came up green. |
Member
|
Oh, indeed. I had a feeling it was Go 1.19 and discounted the check because I had another feeling this was Windows-only code and not built... But I was wrong on all points :D The Mac failure is a signing issue which I shall sort out. |
calmh
approved these changes
Nov 21, 2022
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Nov 22, 2022
* main: (23 commits) lib/fs: Optimize WindowsInvalidFilename (syncthing#8687) gui, man, authors: Update docs, translations, and contributors cmd/syncthing: Use main logger in generate subcommand (fixes syncthing#8682) (syncthing#8685) build: Update all dependencies (fixes syncthing#8679) (syncthing#8680) gui, man, authors: Update docs, translations, and contributors lib/model: Correctly set xattrs on temp files (fixes syncthing#8667) (syncthing#8670) gui: Automatically dismiss authentication reminder when in LDAP mode (fixes syncthing#8661) (syncthing#8663) lib/model: Correctly handle xattrs on directories (fixes syncthing#8657) (syncthing#8658) lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes syncthing#8654) (syncthing#8655) lib/fs: Try to remove read only Windows files (fixes syncthing#3744) (syncthing#8650) gui: Add copy to clipboard, share by email, and share by SMS buttons to device IDs (fixes syncthing#2771, ref syncthing#3868) (syncthing#7984) gui, man, authors: Update docs, translations, and contributors build: Add GitHub actions build for Windows (syncthing#8627) gui: Fix connection type icon width (fixes syncthing#8592) (syncthing#8644) gui: Adjust connection type icon size scaling and alignment (syncthing#8645) docker: Use healthcheck endpoint (syncthing#8640) lib/connections: Use adaptive write size for rate limited connections (fixes syncthing#8630) (syncthing#8631) gui: Mark devices that haven't connected for a long time (fixes syncthing#7703) (syncthing#8530) gui: Fix rescan interval when add encrypted folder with watch for changes enabled (fixes syncthing#8570) (syncthing#8571) gui: Always show Out of Sync Items for remote devices (syncthing#8632) ...
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Replaced strings.Split with the new strings.Cut, which doesn't allocate.