Fixed parquet writer performance degradation#657
Conversation
| public function write($buf) : void | ||
| { | ||
| while (TStringFuncFactory::create()->strlen($buf) > 0) { | ||
| while ($buf != '') { |
There was a problem hiding this comment.
I just noticed, how terrible those default classes from Thrift 🤦 instead of using strlen, they are creating an object that is using strlen inside 🤦 🤦 🤦 I might need to look into other classes and create our own custom implementations just slightly optimized or maybe even optimize it directly in thrift repo
There was a problem hiding this comment.
ah shit 🤦 IDE replaced this for me and I didn't notice it's != instead of !==. It wont affect anything as there can't be anything different than string here, will correct that later. Do you know if there is a rule in phpstan/psalm maybe that could enforce strict checks?
There was a problem hiding this comment.
There is a cs-fixer rule: https://cs.symfony.com/doc/rules/strict/strict_comparison.html but is really dumb one, and will lead to replacing every == with === without checking the code, so objects comparison will be also replaced will fail after applying.
Change Log
Added
Fixed
Changed
Removed
Deprecated
Security
Description