cnumr / EcoIndex

Dépôt du site www.ecoindex.fr
http://www.ecoindex.fr
Other
65 stars 13 forks source link

[Bug]: Formula issues? #333

Closed FANMixco closed 1 month ago

FANMixco commented 3 months ago

Que s'est il passé ?

I'm wondering how accurate is your calculator (don't take it personally, I want your solution to succeed). I wasn't aware of its existence until I wrote an article and someone suggested testing it. However, I noticed considerable discrepancies between Ecograder, Website Carbon Calculator, Beacon, and yours.

This is a screenshot of my personal website's results per solution:

Previews results

As we can see the differences are massive.

I'm wondering why your results are extremely different since my results moved from 0.191g on average to over 2g per loading. It means that my website is 1047% more polluting based on your calculator. It sounds quite strange. Something is not right. Either all other solutions have wrong formulas or yours is considering significantly different variables that nobody else has thought about them.

I'd like to know your conclusions.

Sources:

Sur quel navigateur avez vous rencontré ce problème ?

No response

Sur quel device rencontrez vous le problème ?

No response

Un message d'erreur est il apparu ?

No response

yaaax commented 3 months ago

Hi Federico, You should have a look at the "Analysis methodology" section at page How does it work?.

When an analysis is launched, the requested page is loaded in a real Chrome browser and play the following scenario:

  1. Launch a headless Chrome browser with no-sandbox, disable-dev-shm-usage options and goog:loggingPrefs capabilities at {"performance": "ALL"}
  2. Open the page without local data (cache, cookies, localstorage…) with a resolution of 1920x1080px
  3. Wait 3 seconds
  4. Scroll down
  5. Wait 3 seconds again
  6. Close the page

The difference with other tools probably resides in the scroll down.

Cheers

FANMixco commented 3 months ago

Hi Federico, You should have a look at the "Analysis methodology" section at page How does it work?.

When an analysis is launched, the requested page is loaded in a real Chrome browser and play the following scenario:

  1. Launch a headless Chrome browser with no-sandbox, disable-dev-shm-usage options and goog:loggingPrefs capabilities at {"performance": "ALL"}
  2. Open the page without local data (cache, cookies, localstorage…) with a resolution of 1920x1080px
  3. Wait 3 seconds
  4. Scroll down
  5. Wait 3 seconds again
  6. Close the page

The difference with other tools probably resides in the scroll down.

Cheers

Hi @yaaax, thanks for your reply. I have some observations. I ran it as suggested in Incognito and Guest modes. Partially the ranking and the weight changed, but only the first time I ran it.

The weight was reduced to 0.6 MiB (the same as the other calculators), but the next time I ran it, it increased to 1.33-1.65 MiB without deploying any new change. It makes little sense.

The ranking partially increased once from E to D, but the amount of calls and elements were still common complaints that probably impacted Ecoindex results considerably. I felt the number of call was exaggerated (143) since I have several images, but most are lazy loaded and I don't reach 60 (all are tiny, not more than 10 kb). Also, the number of elements (876?) probably don't have the same impact anywhere else to provide you with your carbon footprint -in my opinion-.

For example, using Digital Beacon (ranking B), I got these results:

preview

And in Ecoindex (which doubles the amount of requests), I got this one recently:

preview 2

Do I think the scroll is not considered in the other solutions? I don't think so. It's considered. Ecograder always showed each and every single file loaded and highlighted some images at the bottom of my website. The images came from lazy-loaded iFrames. That's why, I implemented a lazy loading image strategy, and the results improved significantly. Therefore, the scroll is considered in all other calculators since the changes were reflected in all of them.

Furthermore, talking about mobile modes. My website has 3 different UIs with 3 different sets of images and UXs, considering whether it is mobile, tablet or desktop. Even when I ran Ecoindex on my phone, it always scanned the desktop mode as the preview was still the desktop one.

Therefore, if my CO2 impact was still 2g per loading (since it never changed) even though the website weight was reduced from 1.33-1.65 to 0.6 (once) MiB, I still believe something is still odd. I'd say the website weight should have a higher impact since I don't think if I load 600 empty divs (without any effects or colors), they should affect your CO2 emissions significantly.

vvatelot commented 3 months ago

Hello @FANMixco thanks for reaching us out. Here is the details of resources downloaded while making an ecoindex analysis:

         type  count      size
0       audio      0     0.000
1         css     13    29.557
2        font      7   123.473
3        html      5    10.040
4       image     50   809.318
5  javascript     33   558.372
6       other     15    18.781
7       video      0     0.000
8       total    123  1549.541

You can also have a look at the resulting .har

You can check with tools like https://toolbox.googleapps.com/apps/har_analyzer/: There is a mistake and the results are not exactly accurate, but from what I can see, results from ecoindex are quite similar to raw har analyzer

github-actions[bot] commented 1 month ago

Cette issue a été marquée comme inactive car elle n'a pas eu de mise à jour depuis 30 jours. Si elle n'est pas mise à jour d'ici 7 jours, elle sera fermée automatiquement. Pour éviter qu'elle soit fermée, vous pouvez ajouter le label keep open.

github-actions[bot] commented 1 month ago

Cette issue a été fermée car elle est inactive depuis 37 jours. Si vous pensez que c'est une erreur, vous pouvez la rouvrir.