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

Clarify whether UA can clear the buffer under memory pressure #94

Closed
spanicker opened this issue Jan 27, 2017 · 4 comments
Closed

Clarify whether UA can clear the buffer under memory pressure #94

spanicker opened this issue Jan 27, 2017 · 4 comments

Comments

@spanicker
Copy link

The spec says "The user agent may choose to limit how many resources are included as PerformanceResourceTiming objects in the Performance Timeline"

However it is not clear (to me) whether this applies to the default buffer size, or the user agent can choose to clear the buffer when needed. Please clarify.

For background, see: https://crbug.com/685452 for an example where 16k objects (FB is setting buffer to 100k) are bloating memory.

@yoavweiss
Copy link
Contributor

Maybe we should add a return value to setResourceTimingBufferSize() that'd enable browsers to refuse certain buffer sizes?

At the same time, one can argue that apps can buffer entries externally without any memory limits, so why limit them internally?

@n8schloss
Copy link

So on Facebook we're using a fairly large buffer because there are times when we want to ensure that we're capturing all events within a certain time window. We're going to make a change to clear out the buffer of everything older than a specified time limit every so often, but it'd be nice (and probably more performant) if the api just supported this natively. This way the cleanup could only happen if it was actually needed.

@toddreifsteck toddreifsteck added this to the Level 2 milestone Nov 7, 2017
@yoavweiss
Copy link
Contributor

Let's discuss on the webperf issue triage call. It's not clear to me if UAs actually want to enforce such limits.

@toddreifsteck
Copy link
Member

This is a general question regarding buffers of various Performance Timeline items. Moving to Performance Timeline.

This could be achieved by any UA by firing the onbufferfull event allowing the web site to pull events BEFORE clearing the buffer. Because this behavior may not be handled by web sites, it would need to be specced clearly and may need some outreach to sites such as Facebook @n8schloss

Opening w3c/performance-timeline#101 to trace this issue on timeline

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

No branches or pull requests

4 participants