-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Remove Page X-ray specific functions #182
Comments
Hi @fershad yes let's move them, I can do that the coming week, I'll ping the issue when I'm done or if I get into trouble. |
Thanks @soulgalore. No rush to get this in, I don't see us making the change at our end until late Jan or Feb 2024. |
* Move functionality from co2 to sitespeed.io. See thegreenwebfoundation/co2.js#182 * lint
@fershad that is merged in sitespeed.io, going out in a release before Christmas. I think it actually would be cool if co2 provided that data but you could collect it directly from a HAR file to get rid of the PageXray dependency. |
hey @soulgalore , @fershad - I think what Peter raises is a good point that we might touch on in future. We know right now that different calculators make different assumptions how they aggregate figures per domain - this likely goes some way to explaining why Ecograder, Sitespeed, and Webpagetest can have slightly different figures for the same page. If this kind of functionality isn't in CO2.js, it might be worth at least us documenting the different approaches used to provide the per-domain figures. I think some calculators use a global annual co2 intensity figure, and others use a national annual figure, and some even use national hourly figure from a source like electricity maps. I've created #183 to capture this discussion for future reference. |
Describe the bug
There's a bunch of Page X-ray specific functions in the CO2.js library. This isn't specific to any model. I am not aware of any other user (besides sitespeedio/sitespeed.io) who are using these functions.
@soulgalore would it be possible to move these functions into the Sitespeed sustainbility plugin itself? That would help reduce the code we ship with the library (#121) as well as reduce the size of our tests.
We would not make this change for a few months, and would socialise it with the community to try and ensure no other projects are impacted.
Additional context
co2.js/src/co2.js
Lines 190 to 290 in 51b85e2
The text was updated successfully, but these errors were encountered: