Skip to content
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

Fixed parquet writer performance degradation #657

Conversation

norberttech
Copy link
Member

Change Log

Added

Fixed

  • parquet writer performance degradation

Changed

Removed

Deprecated

Security


Description

@@ -63,15 +62,16 @@ public function read($len)

public function write($buf) : void
{
while (TStringFuncFactory::create()->strlen($buf) > 0) {
while ($buf != '') {
Copy link
Member Author

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be strict check?

Copy link
Member Author

Choose a reason for hiding this comment

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

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?

Copy link
Member

Choose a reason for hiding this comment

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

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.

@norberttech norberttech merged commit fd04767 into flow-php:1.x Oct 28, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants