Open roomisalah opened 7 years ago
We are all facing this issue. Any help in this area will be helpful. Load time for large books with SMIL is very high.
There are no plans to implement SMIL lazy-loading (ReadiumJS and ReadiumSDK/C++). However, this would certainly improve initial-load performance (possibly at the detriment of playback-time performance, but this could be mitigated with some look-ahead techniques).
Things to consider:
There might be functions in the Media Overlays engine (in readium-shared-js
) that depend on having access to the entire SMIL timing tree across multiple spine items (I'm not sure, from the top of my head). I think there are also calculations (for total durations, IIRC) performed during full-publication parsing. Again, to be verified, I'm not sure anymore.
Although the loaded EPUB publications are passed as a monolithic JSON dataset to readium-shared-js
, the exception to this rule of thumb is the table of contents (EPUB2 NCX / EPUB3 Navigation Document), which is loaded separately by the viewer instance. In other words, there is a precedent with regards to fetching resources from the EPUB container after the main JSON is generated. This model could be followed for the SMIL files too.
Readium performance is very poor loading large ePub with hundreds of SMIL files. It is taking more than 18-20 seconds to show the first page which is not acceptable in the web-world.
After debugging, it has been noticed that Readium itself loads all the SMIL file at once and waits until all the SMIL file is loaded before showing up the first page.
Is there is any setting/way to deferred these calls and load SMIL data one by one after the page gets loaded? This way we can improve the performance.
I would appreciate if someone suggests improving the Readium performance?
Thanks in advance!
Below is the code snippet which loads all the SMIL data: this.fillSmilData = function (callback) { var that = this;
}