Skip to content
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

Improve the memory usage of fragment (CSR) using delta encoding and varint #1373

Closed
sighingnow opened this issue May 12, 2023 · 0 comments · Fixed by #1372 or #1516
Closed

Improve the memory usage of fragment (CSR) using delta encoding and varint #1373

sighingnow opened this issue May 12, 2023 · 0 comments · Fixed by #1372 or #1516
Assignees
Labels
component:graph enhancement New feature or request

Comments

@sighingnow
Copy link
Member

Additional context

See also: alibaba/GraphScope#2628

@sighingnow sighingnow added enhancement New feature or request component:graph labels May 12, 2023
sighingnow added a commit that referenced this issue May 26, 2023
…mory usage (#1372)

Related issue number
--------------------

- Fixes #1373
- Part of alibaba/GraphScope#2628

---------

Signed-off-by: vegetableysm <yuanshumin.ysm@alibaba-inc.com>
Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
Co-authored-by: Tao He <linzhu.ht@alibaba-inc.com>
sighingnow added a commit that referenced this issue May 30, 2023
What do these changes do?
-------------------------

- add back the offset array for correct degree
- use v8dec/nec for varint encoding
- implements batch decoding in CompactNbr

Part of #1373

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
sighingnow added a commit that referenced this issue Aug 12, 2023
…ry (#1516)

This pull request enhances the previous varint encoding implementation by:

- use serialized, batch encoding (not slow than previous implementation, thanks to batching)
- reuse the ie list when encoding, avoid extra memory allocation and copy
- use the shrink API to adjust the size of the encoded blob writer.

After this pull request, compacting edges with varint no longer requires extra memory,
and the encoding execution time has been optimized (almost half) as well.

Fixes #1373

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment