Skip to content

Fixed #746.#747

Merged
redboltz merged 1 commit intomsgpack:masterfrom
redboltz:fix_746
Nov 23, 2018
Merged

Fixed #746.#747
redboltz merged 1 commit intomsgpack:masterfrom
redboltz:fix_746

Conversation

@redboltz
Copy link
Copy Markdown
Contributor

Eliminated redundant zone allocation in unpacking process.
ARRAY and MAP is construced on the zone.
STR, BIN, and EXT refer to unpack buffer, and the buffer is reference
counted via zone (finalizer).

So zone is only needed if those types are appeared during unpacking
process.

I set zone to NULL by default. And the context has the pointer to
pointer to the zone. If the context meets ARRAY, MAP, STR, BIN, or EXT,
and zone (via pointer) is NULL, then allocate new zone.

It is lazy zone allocation strategy.

Eliminated redundant zone allocation in unpacking process.
ARRAY and MAP is construced on the zone.
STR, BIN, and EXT refer to unpack buffer, and the buffer is reference
counted via zone (finalizer).

So zone is only needed if those types are appeared during unpacking
process.

I set zone to NULL by default. And the context has the pointer to
pointer to the zone. If the context meets ARRAY, MAP, STR, BIN, or EXT,
and zone (via pointer) is NULL, then allocate new zone.

It is lazy zone allocation strategy.
@alexkamp
Copy link
Copy Markdown

This does solve #746 in my environment. Nice work.

@redboltz redboltz merged commit daa78b4 into msgpack:master Nov 23, 2018
@redboltz redboltz deleted the fix_746 branch November 23, 2018 10:56
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.

2 participants