Skip to content

Conversation

zdyj3170101136
Copy link
Contributor

Summary

here is memory inuse bytes pprof.

the ColStr WriteColumn copy the buf.

截屏2024-10-22 上午10 15 32

reduce max memory usage bytes by use writev.

@zdyj3170101136
Copy link
Contributor Author

@ernado cc

@zdyj3170101136
Copy link
Contributor Author

@ernado could you merge it ?

@zdyj3170101136 zdyj3170101136 requested a review from ernado October 24, 2024 02:32
@zdyj3170101136 zdyj3170101136 requested a review from jdef November 15, 2024 02:42
Copy link
Collaborator

@ernado ernado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the question in review comments.

@vincentbernat
Copy link

I am unsure if a resolved conversation will be visible enough for people reviewing, hence this comment.

From my understanding, if c.Buf does not have enough space to store a varint, it is extended. The condition is hit on the very first use (and is already covered by unit tests). This is needed as now the representation inside c.Buf is, for each string, varint + string. c.Pos still represents the start and end of the string without the varint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants