WebHelp output size

kenrao
Posts: 10
Joined: Fri Jun 18, 2021 8:27 pm

WebHelp output size

Post by kenrao » Thu Jun 24, 2021 6:19 pm

Hi,
I’m from a company that is successfully using Oxygen XML Author and PDF Chemistry, and we are now evaluating Oxygen WebHelp as a potential publishing solution.

In the WebHelp output, I’ve noticed that the publication TOC links get added to every single topic file. This drastically increases the overall size of the help, especially when you have a glossary or a commands list that has topics listed alphabetically and cannot be chunked. For example, the size of my WebHelp collection with the publication TOC component present is 140 MB. However, if I set the transformation parameter webhelp.show.publication.toc to 'no' and generate the help, the output size reduces to 40 MB. So, about 100 MB is getting added just because of TOC links in the topic pages.

I saw a similar thread, but removing the top menu TOC did not affect the topic file size.

Ideally, all the TOC info should be in a separate file, which then gets shared across topics. Is there a solution or workaround for this?

Thanks,
Ken

Costin
Posts: 734
Joined: Mon Dec 05, 2011 6:04 pm

Re: WebHelp output size

Post by Costin » Mon Jun 28, 2021 12:35 pm

Hi Ken,

We used a separate TOC files structure in the past for deprecated transformations, but came to the conclusion it could generate other issues (like security, search related issues, etc.). Thank you for the feedback anyway!

Indeed, in the WebHelp implementation we decided to use, there is a minimal TOC structure generated and included in each of the topics.
More specific, that minimal structure contains the paths to the root topic, the siblings of the current topic and its first level child topics.

If I correctly understood, you have a DITA Map with a pretty large Glossary section, that contains a lot of glossary references, DITA Map which, after publishing it to WebHelp, results in a 40MB output even without a TOC.
In this case, probably filtering the glossary entries from being included in the table of contents could considerably reduce the output size.
It is not necessary to remove the TOC at all (by setting the webhelp.show.publication.toc parameter which you already stumbled upon), but setting the toc="no" attribute on the glossary references in the .ditamap file.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

kenrao
Posts: 10
Joined: Fri Jun 18, 2021 8:27 pm

Re: WebHelp output size

Post by kenrao » Mon Jun 28, 2021 2:46 pm

Hi Costin,

Thanks for the information. I have a Command Reference manual, and this has a long list of commands from A to Z. And now in the WebHelp output, each command page has the TOC links of all the other commands, which seems unnecessary.

Using toc=”no” makes it look like the topic is missing from the help, but you can find it if you do a search. So, I definitely can’t use toc=”no”.
As an experiment, I grouped the commands, thereby reducing the length of the TOC. And this reduced the output size from 140 MB to 60 MB. However, I can’t have the commands grouped and need them to appear as one list.

I’m not sure what else could be done. Would it be possible to customize the publication TOC to have a separate structure so that the links don’t get included in the topic files?

Thanks,
Ken

Costin
Posts: 734
Joined: Mon Dec 05, 2011 6:04 pm

Re: WebHelp output size

Post by Costin » Tue Jun 29, 2021 12:49 pm

Hi Ken.

We do not have an out-of-the-box solution for what you want to achieve.
Even so, the "toc.xml" file - which represents the basics for generating the TOC - is already present in the temp directory of the output.

Given this, most probably you could use it to create your own XSLT extension using the com.oxygenxml.webhelp.xsl.createNavLinks extension point to generate a separate TOC structure (maybe as a JSON file). You can then load the custom TOC structure through a custom JavaScript. You can contribute custom HTML content (including references to custom JS resources) using this procedure: How to Insert Custom HTML Content.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

kenrao
Posts: 10
Joined: Fri Jun 18, 2021 8:27 pm

Re: WebHelp output size

Post by kenrao » Wed Jun 30, 2021 5:49 pm

Thanks, Costin. I will give this a try.

Regards,
Ken

Post Reply