Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Don't purge bindings when execution leaves scope #2136

Closed
wants to merge 1 commit into from
Closed

Conversation

NTillmann
Copy link
Contributor

Release notes: None

For historical and apparently no longer needed reasons,
we used to forget about modified bindings when execution
leaves scopes.

However, this means that the binding no longer properly participates
in state tracking, which is conceptually dubious.

While by itself, it didn't seem to cause much (or any?) harm,
it turned out to be a blocker for #2125, where the initial state
of a binding becomes important when joining partially leaked bindings.

Release notes: None

For historical and apparently no longer needed reason,
we used to forget about modified bindings when execution
leaves scopes.

However, this means that the binding no longer properly participates
in state tracking.

While by itself, it didn't seem to cause much (or any?) harm,
it turned out to be a blocker for #2125, where the initial state
of a binding becomes important when joining partially leaked bindings.
NTillmann added a commit that referenced this pull request Jun 20, 2018
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@hermanventer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

NTillmann added a commit that referenced this pull request Jun 20, 2018
@gaearon
Copy link
Contributor

gaearon commented Jun 20, 2018

Don't know if it was expected, but this commit makes the build 3 times slower for our internal bundle in my testing. That makes it significantly more difficult for me to extract isolated small test cases because it kills my iteration speed.

@hermanventer
Copy link
Contributor

I'm afraid I just forgot about it. It looks like we'll have to resurrect something like this after all. I'll have a look at it.

facebook-github-bot pushed a commit that referenced this pull request Jun 25, 2018
Summary:
Release note: none

This reverses PR #2136, which Dan has noted to lead to a 3x slowdown for an internal bundle. In order to fix the problem that Nikolai's PR addressed, the original code has been modified to not purge any local bindings that could possibly have been captured in a closure.

I expect that most effects will not be in a context that contains a closure, so this should help. It would be nice, however, to get some feedback on whether this is actually the case.
Closes #2152

Differential Revision: D8617877

Pulled By: hermanventer

fbshipit-source-id: 8e907ba1dded0428388fd42132658555e3b8e82e
@hermanventer hermanventer deleted the DontPurge branch June 25, 2018 20:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants