-
Notifications
You must be signed in to change notification settings - Fork 527
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
Reduce unnecessary string creation when interacting with rocksdb #1583
Comments
/assign @ccmaxcc |
@ccmaxcc Are you having some trouble? If so, please let us know so that we can communicate together. |
Interested in CurveFS, is this PR still available to contribute? I can start with this PR to get familiar with CurveFS. |
@liam-thunder You are very welcome to contribute to this PR. |
address this issue in #2183 |
@liam-thunder Is this still going on? |
Sorry for late response, this issue is blocked by E2E benchmark testing and performance analysis, and requiring some extra efforts. But I'm quite busy recently, will get back on this issue later. |
@liam-thunder Are you still going on? |
Yes, I'm working on deploy a single node cluster to do the benchmark. |
If you have any questions during the benchmarking process, please feel free to ask. You can also communicate in the WeChat group. |
Now, we use rocksdb as metadata storage, for Get and Iterate operations, rocksdb yields
rocksdb::Slice
that stands for key/values.For
rocksdb::Slice
, is almost same withstring_view
in C++17,StringPiece
in chromium. And they have the same idea behind it - they are just views of strings, and don't own the underlying string. And they may give some improvement in some cases.However, in some source code, we don't follow this design, for example,
RocksDBStorageIterator::Value
returns a std::string which is creating from arocksdb::Slice
and does memcpy in this progress. But, in most cases, we just parse a protobuf Message from the string which means the creation is unnecessary.The text was updated successfully, but these errors were encountered: