yea its a bit of an odd question, sorry about the phrasing. the complication is that the in5 is processing all the written content within the html frame as if it was text content. as an update i tested setting the object export options to Rasterize content and Rasterize frame with image quality set to Use Object Export settings with no benefits being gained in the export time.
For more content, exporting a 46 page book with the search module (which contains some html and the contents of book as javascript created via a script) takes me about 10-12 minutes, if i remove the HTML frame with the search module it takes me 5-6 minutes on a 2019 intel Macbook, my teammates on M2 Macbooks take about %60 of that time.
yes the idea about using the js as a resource was my backup idea, but that would require the time of our software engineer who made the module and script, i thought id check here to see if there was an in5 or indd option to avoid requiring his time. thanks!