aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.18k stars 840 forks source link

Don't download 200MB of JS for a JavaDoc search feature that most people don't use #5274

Open michaelboyles opened 4 months ago

michaelboyles commented 4 months ago

Upcoming End-of-Support

Describe the issue

When visiting https://sdk.amazonaws.com/java/api/2.25.67/software/amazon/awssdk/regions/providers/DefaultAwsRegionProviderChain.html

I observed that the loading spinner on the tab seemingly spun forever. After looking at the network tab, I saw it was downloading this: https://sdk.amazonaws.com/java/api/2.25.67/member-search-index.js

It's 216MB of JS... I'm pretty sure this file is generated by the default JavaDoc tool. It's a search index which I think is only useful when using the top-right search box, which I never use anyway.

I don't know whether Chrome refuses to cache it because it's so massive, or cache headers are not set properly, but every single page requests it from scratch.

The type search at https://sdk.amazonaws.com/java/api/2.25.67/type-search-index.js is also 17MB which is less horrendous, and at least that one gets cached, but that is still too much to download.

For now, I blocked this URL https://sdk.amazonaws.com/*search-index.js in my ad blocker

Links

https://sdk.amazonaws.com/java/api/2.25.67/software/amazon/awssdk/regions/providers/DefaultAwsRegionProviderChain.html

As well as every single page

debora-ito commented 4 months ago

@michaelboyles thank you for raising this. 200+ MB surely is a lot to be downloaded in every page.

Moving this to the Java SDK v2 repo.