yiisoft / yii2-redis

Yii 2 Redis extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
451 stars 184 forks source link

Big cost of preliminary implode params for parseResponse error #264

Closed alx-xc closed 11 months ago

alx-xc commented 11 months ago

What steps will reproduce the problem?

mget with big list of keys

What's expected?

Expected: normal execution time, like with older versions (like 2.0.7)

What do you get instead?

Instead: excecution time increased from 2s to 30+s when yii-redis updated from 2.0.7 to 2.0.13

Additional info

implode called for every call of parseResponse we have a lot of executions for Multi-bulk replies

photo_2023-10-18 19 34 41

Q A
Yii vesion 2.0.13 (version of yii2-redis)
PHP version 7.4.3
Operating system ubuntu
bizley commented 11 months ago

Indeed, it should not be done like that, I can see it was changed in 2.0.11. Could you prepare PR fixing it?

rob006 commented 11 months ago

https://github.com/yiisoft/yii2-redis/pull/265