-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(redactors): memory consumption improvements (#1332)
* Document additional go tool profiling flags * Add a regex cache to avoid compiling regular expressions all the time * Reduce max buffer capacity * Prefer bytes to strings Strings are immutable and hence we need to create a new one all the time when operation on them * Some more changes * More bytes * Use writer.Write instead of fmt.FPrintf * Clear regex cache when resetting redactors * Logs errors when redactors error since they get swallowed * Add an improvement comment * Limit the number of goroutines spawned when redacting * Minor improvement * Write byte slices one at a time instead of concatenating them first * Add a test for writeBytes * Additional tests
- Loading branch information
Showing
10 changed files
with
227 additions
and
81 deletions.
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
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
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
Oops, something went wrong.