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

Improve the performance even more (part 2/3) #46

Open
wolfy-j opened this issue Dec 26, 2019 · 3 comments
Open

Improve the performance even more (part 2/3) #46

wolfy-j opened this issue Dec 26, 2019 · 3 comments
Labels
type:enhancement Enhancement.

Comments

@wolfy-j
Copy link
Contributor

wolfy-j commented Dec 26, 2019

Based on this benchmark https://github.com/adrianmiu/forked-php-orm-benchmark the ORM is pretty slow currently compared to competitors.

The reference test:
Без названия

Current results:
Screenshot_136

The ideal optimizations based on cached nodes and generated mappers looks like:
Screenshot_69

Need to abstract Node Parsers into its own factory so:

  1. They can be cached (the structure does not change between requests)
  2. They can be generated (to be benched, but in theory, it should produce even better results).

The persist most likely can't be optimized a lot due to the nature of the graph traversal algorithm.

@wolfy-j wolfy-j added the type:enhancement Enhancement. label Dec 26, 2019
@wolfy-j
Copy link
Contributor Author

wolfy-j commented Jan 12, 2020

Part 1 of improvement is on its way to be released. The SQL statement cache improves query generation by 25%.

Status: complete.

@wolfy-j
Copy link
Contributor Author

wolfy-j commented Jan 13, 2020

Part 2: internal Cycle optimizations. Minor improvements in Node parsers and data typecast will lead to 15% performance improvement as the hottest part of the selection.

Status: complete.

@wolfy-j wolfy-j changed the title Improve the performance Improve the performance (even more) Jan 13, 2020
@wolfy-j wolfy-j changed the title Improve the performance (even more) Improve the performance (part 2/3) Jan 13, 2020
@wolfy-j wolfy-j changed the title Improve the performance (part 2/3) Improve the performance even more (part 2/3) Jan 15, 2020
@wolfy-j wolfy-j added this to To do in v1.x Mar 7, 2020
@wolfy-j wolfy-j moved this from To do to In progress in v1.x Mar 7, 2020
@wolfy-j
Copy link
Contributor Author

wolfy-j commented Apr 7, 2021

Part 3: The command graph can be sorted on relation level, then iterated over the list of object nodes essentially extracting the dependency matrix from the Command itself. It will require graph baking but should significantly increase persist performance and also reduce memory footprint (with active memorization).

@roxblnfk roxblnfk removed this from In progress in v1.x Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Enhancement.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant