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

Only call get_table_id() when type is not found in local cache #1438

Merged
merged 2 commits into from
Mar 28, 2022

Conversation

senderista
Copy link
Contributor

This improves time/insert in test_insert_perf.simple_table_insert from 0.49us to 0.46us.

if (!table_id.is_valid())
{
ASSERT_INVARIANT(skip_catalog_integrity_check, "Cannot find table id for object type!");
// Map this type to an empty indexes vector.
Copy link
Contributor

Choose a reason for hiding this comment

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

You're doing this because ... you want to avoid re-doing this check? You should mention this in the comment then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@LaurentiuCristofor LaurentiuCristofor left a comment

Choose a reason for hiding this comment

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

I'd just improve the comment by explaining why we're inserting an empty array in the map.

@senderista senderista merged commit d0a6800 into master Mar 28, 2022
@senderista senderista deleted the tobin/lazy_get_table_id branch March 28, 2022 23:44
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.

2 participants