Comments (3)
You're welcome. At the time I wrote the package, making averageBits
a constant led to much faster code, and since it isn't necessary for restic to configure this, it was left as a constant.
I would consider a PR which adds configuration options for this, if it happens in a backwards compatible way and is not significantly slower than the old code with Go >= 1.8.
What do you plan to do with the chunker?
from chunker.
I would consider a PR which adds configuration options for this, if it happens in a backwards compatible way
I guess that the only option to extend library interface is to add an extra constructor for Chunker
, something like:
func NewWithCustomAverageBits(rd io.Reader, pol Pol, int averageBits) *Chunker {
// ...
}
Also, averageBits
should become either a global scope variable, or a chunkerConfig
member.
and is not significantly slower than the old code with Go >= 1.8
Do you mean that changing averageBits
from constant to variable would reduce chunker performance?
What do you plan to do with the chunker?
I'm doing some research on a storage optimizations (especially on data deduplication), and I faced with a use-case where averageBits
should be slightly reduced in order to achive better deduplication. A good example is a stream of small text files with little pairwise differences.
from chunker.
I guess that the only option to extend library interface is to add an extra constructor for Chunker, something like:
What about adding a method on the *Chunker
, like SetAverageBits(bits int)
?
Also, averageBits should become either a global scope variable, or a chunkerConfig member.
Nonono, no global variable, it must be specific to a single *Chunker
. Global state is bad.
Do you mean that changing averageBits from constant to variable would reduce chunker performance?
Exactly, at least for old versions of Go (like 1.3 or so).
I'm doing some research on a storage optimizations (especially on data deduplication), and I faced with a use-case where averageBits should be slightly reduced in order to achive better deduplication. A good example is a stream of small text files with little pairwise differences.
Ah, that makes sense. Thanks for explaining!
from chunker.
Related Issues (15)
- non-optimal memory layout for chunkerConfig struct HOT 1
- release HOT 2
- chunker.Next with no allocations HOT 10
- Possible updates with the use of non-Rabin algorithms HOT 5
- Separate the rolling hash function from the chunker HOT 7
- chunker.Next: read gives input/output error HOT 3
- Should I use chunker in production? HOT 2
- Let the chunker return the content of the chunks HOT 2
- MulPoly function bug
- some cut numbers are zeros HOT 2
- Chunk size distribution problem. HOT 7
- Add CI tests for go1.5
- Chunker on data containing series of zeroes HOT 3
- Inserting 1 at the beginning of the hashed data HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chunker.