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

BUG?: HTML files are big #10057

Closed
larsoner opened this issue Nov 30, 2021 · 3 comments
Closed

BUG?: HTML files are big #10057

larsoner opened this issue Nov 30, 2021 · 3 comments
Labels

Comments

@larsoner
Copy link
Member

Waiting for CircleCI to upload artifacts, I noticed:

Uploading /home/circleci/project/doc/_build/html/generated/mne.chpi.head_pos_to_trans_rot_t.html (107 kB): 

locally, it looks like ~80 kB is in a <ul> with ~3k lines of the form:

   <li class="toctree-l2">
    <a class="reference internal" href="mne.io.anonymize_info.html">
     mne.io.anonymize_info
    </a>
   </li>

Looks like this is really the full left column of collapsible API pages.

@drammock have you thought about how this could be optimized at the pydata-sphinx-theme end? We have ~500 of these docs so we are talking about something like 50MB of redundancy in content around these pages, all of which is identical except for which are collapsed/shown (which is maybe easy to take care of in JavaScript?). Maybe it's not worth worrying about, in which case feel free to close.

@larsoner larsoner added the BUG label Nov 30, 2021
@drammock
Copy link
Member

This is a known issue upstream. I haven't followed the discussion too closely but I'll look at it again and see what, if anything, can be done about it

@larsoner
Copy link
Member Author

No rush, good for a Sunday hack! Closing as an upstream issue.

@drammock
Copy link
Member

Here are the possibly relevant issues / guidance for reducing TOC size within the theme. I haven't re-read all of these recently, just collecting them here as a breadcrumb for whenever I or someone else has time to fix this. TLDR: it probably involves either limiting TOC depth with a theme setting, or suppressing (via path/wildcard) certain TOC entries from showing up at all (regardless of their depth).

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

No branches or pull requests

2 participants