Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@driusan
Copy link
Collaborator

@driusan driusan commented Aug 8, 2023

When calling bulkLoadInstanceData, currently only instrument data is bulk loaded from the database. However, calling getSessionID or getVisitLabel is almost always required in order to use the data. This bulk loads the session id and visit label from the same query when calling bulkLoadInstanceData in order to further optimize it.

When calling bulkLoadInstanceData, currently only instrument data is
bulk loaded from the database. However, calling getSessionID or getVisitLabel
is almost always required in order to use the data. This bulk loads the
session id and visit label from the same query when calling bulkLoadInstanceData.
@driusan driusan added the Language: PHP PR or issue that update PHP code label Aug 8, 2023
@ridz1208 ridz1208 self-assigned this Oct 13, 2023
function getVisitLabel(): string
{
return \TimePoint::singleton($this->getSessionID())->getVisitLabel();
if ($this->visitLabel === null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm just curious, why is this done in a lazy way instead of being instantiated in the factory?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know, I didn't want to change the behaviour so I left if the way it was and just added caching.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense :)

@laemtl laemtl self-requested a review November 13, 2023 15:27
@driusan driusan merged commit 57379f2 into aces:main Nov 13, 2023
@ridz1208 ridz1208 added this to the 26.0.0 milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language: PHP PR or issue that update PHP code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants