Skip to content

Conversation

@stayallive
Copy link
Collaborator

@stayallive stayallive requested a review from Litarnus October 30, 2025 11:06
Copy link
Contributor

@Litarnus Litarnus left a comment

Choose a reason for hiding this comment

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

Nice, looks good!

/**
* @var array<int, array<string, bool>> The list of flags associated to this scope
*/
private $flags = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a bit weird that we used indexed arrays here but assoc arrays for spans. I assume this is to make the LRU cache work?

Copy link
Collaborator Author

@stayallive stayallive Nov 3, 2025

Choose a reason for hiding this comment

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

Correct, I also could have gone for array{string, bool}, don't think I need a key-value array here but it also probably doesn't really matter what the inner structure is. But I agree it's not an optimal design. If you have a suggestion I'm open to it but I wanted to get the feature built and see if we find it worth the squeeze to optimize this data structure.

Copy link
Contributor

Choose a reason for hiding this comment

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

No I think it's fine, it makes sense to have them as they are with the current requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants