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

Create performance resource timing entry for synchronous network fetch #23322

Merged
merged 1 commit into from May 10, 2019

Conversation

@pylbrecht
Copy link
Contributor

@pylbrecht pylbrecht commented May 4, 2019


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #23150 (GitHub issue number if applicable)
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

@highfive highfive commented May 4, 2019

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @jdm (or someone else) soon.

@highfive
Copy link

@highfive highfive commented May 4, 2019

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/network_listener.rs
  • @KiChjang: components/script/network_listener.rs

@highfive
Copy link

@highfive highfive commented May 4, 2019

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@pylbrecht
Copy link
Contributor Author

@pylbrecht pylbrecht commented May 4, 2019

@jdm, regarding your idea of passing a function pointer to load_whole_resource():
I'm not sure from where to get the required arguments for submit_timing_data() inside load_whole_resource().

Should we just pass more arguments to load_whole_resource()?
I see GlobalScope and ServoUrl floating around in the code calling load_whole_resource(), but what about InitiatorType?

Copy link
Member

@jdm jdm left a comment

Yes, passing more arguments to load_whole_resource is a fine choice. As for InitiatorType, the only callers of load_whole_resource fall into the Other category so we might as well hardcode that. I would expect us to remove these callers over time; the synchronous resource loading API isn't great for slow connections.

}

pub fn submit_timing_data(
global: &DomRoot<GlobalScope>,
Copy link
Member

@jdm jdm May 6, 2019

This can be &GlobalScope.

@pylbrecht
Copy link
Contributor Author

@pylbrecht pylbrecht commented May 6, 2019

~jdm | pylbrecht: although we may nave a better solution
~jdm | pylbrecht: all of the callers of load_whole_resource live in script/
~jdm | we could just move load_whole_resource to script and make it call submit_timing_data itself              
~jdm | that's going to be more clear and require rebuilding fewer crates in the future
~jdm | load_whole_resource used to be used by lots of other code, but we're slowly getting rid of it            

jdm
jdm approved these changes May 7, 2019
@jdm
Copy link
Member

@jdm jdm commented May 10, 2019

@bors-servo
Copy link
Contributor

@bors-servo bors-servo commented May 10, 2019

📌 Commit e5217ee has been approved by jdm

@bors-servo
Copy link
Contributor

@bors-servo bors-servo commented May 10, 2019

Testing commit e5217ee with merge 623c5d0...

bors-servo added a commit that referenced this issue May 10, 2019
Create performance resource timing entry for synchronous network fetch

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23150 (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23322)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

@bors-servo bors-servo commented May 10, 2019

@bors-servo bors-servo merged commit e5217ee into servo:master May 10, 2019
4 checks passed
@pylbrecht pylbrecht deleted the sync.network.fetch branch May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants