Skip to content

Use smart str for constructing pipeline cmd #2577

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

Merged

Conversation

JakubOnderka
Copy link
Contributor

PHP's smart str provides easier API for appending new string and also do not need new allocation and deallocation for every command issued in pipeline like previously used zend_string.

Copy link
Member

@michael-grunder michael-grunder left a comment

Choose a reason for hiding this comment

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

Great change. This might actually reduce the binary size by a fair bit too.

@michael-grunder michael-grunder merged commit b665925 into phpredis:develop Nov 25, 2024
30 checks passed
@@ -177,13 +177,7 @@ typedef enum {
#define IS_PIPELINE(redis_sock) (redis_sock->mode & PIPELINE)

#define PIPELINE_ENQUEUE_COMMAND(cmd, cmd_len) do { \
Copy link
Member

Choose a reason for hiding this comment

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

@michael-grunder we don't need this macro anymore.

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.

3 participants