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

Fix determining if a stratum has database scans #614

Merged
merged 1 commit into from
Nov 30, 2016
Merged

Conversation

ibdknox
Copy link
Contributor

@ibdknox ibdknox commented Nov 30, 2016

Ifs and nots can technically use only local variables and don't necessarily mean we have database scans. The practical implication of this is that any block that had an if or not in it always reran when evaling. This prevents purely static blocks from doing so.

Copy link
Contributor

@convolvatron convolvatron left a comment

Choose a reason for hiding this comment

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

ok, so this was misclassifying blocks with scans hidden inside sub blocks as one-shot initializers...isnt that a big deal?

@ibdknox
Copy link
Contributor Author

ibdknox commented Nov 30, 2016

Other way around. The old code was conservatively saying that anything with an if/not was definitely not a one-shot block. Now the code recursively checks inside if/not to see if they're actually static too. If everything is static, including the bodies of the ifs/nots, then we can treat the block as single run.

@ibdknox ibdknox merged commit 9afe634 into master Nov 30, 2016
@cmontella cmontella deleted the has-database-scans branch November 30, 2016 22:36
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