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

Delete generated jsonp-callbacks #2323

Closed
markelog opened this issue May 18, 2015 · 6 comments
Closed

Delete generated jsonp-callbacks #2323

markelog opened this issue May 18, 2015 · 6 comments

Comments

@markelog
Copy link
Member

Now we assign it to undefined when undefined when function is executed, we did this because we can't properly delete properties from the window objects on oldIE.

This issue still exist for supported IE8, but i think we should discuss using removeProp method in both branches instead.

@dbkaplun
Copy link

While deleteing the function makes more semantic sense, V8 will deoptimize any objects that have had properties deleted. Just something to keep in mind.

@markelog
Copy link
Member Author

This is pure guessing, first of all, window object should be already deoptimized, since there is a lot of bounded properties, second, window is special host object so there might be another type of optimizations in play.

I wouldn't rely on those assumptions, until they proved by the performance benchmarking.

@markelog markelog added the Ajax label May 19, 2015
@markelog
Copy link
Member Author

@timmywil, @dmethvin, @jaubourg need your opinions here.

Also, would like to know if our perception of the #2317 didn't change.

@dmethvin
Copy link
Member

I agree that window is pretty magic and global so I doubt optimization comes into play here.

Would it make sense to create a single object on window at initialization and put all our JSONP callbacks there? That would work on IE8 too since we'd be deleteing the properties out of that regular object rather than on the global.

@markelog
Copy link
Member Author

Which would mean we would expose three globals and as soon as IE8 dead we could eliminate it, cool.
Although, it seems we would need to do it only because of the one browser.

@timmywil
Copy link
Member

I like the idea of using removeProp, which means we can delete in every browser except IE8 and IE8 receives no change.

markelog added a commit to markelog/jquery that referenced this issue Jul 10, 2015
@timmywil timmywil added this to the 3.0.0 milestone Jul 12, 2015
@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants