Fix support for streaming Web Publications with EPUB profile#731
Fix support for streaming Web Publications with EPUB profile#731mickael-menu wants to merge 1 commit intodevelopfrom
Conversation
| // streamed manifest because it will fetch all the | ||
| // resources on the server. | ||
| if manifest.readingOrder.allAreHTML, isPackage { | ||
| $0.setSearchServiceFactory(StringSearchService.makeFactory()) |
There was a problem hiding this comment.
Maybe it would be desirable to have a SearchService for streamed WebPubs, but that it only fetches content, when/if used to actually search.
There was a problem hiding this comment.
My comment was ambiguous, the SearchService and ContentService are already fetching the resources only when requested (when moving forward in the search iterator, for example). But this allows users to crawl multiple times all the resources of the server, if it does not provide a proper Web Search service. So I think this should be discouraged in the toolkit by default.
As a user of the toolkit, you can always add the StringSearchService yourself after parsing the publication, if you have some control over the server and are okay with potential crawling.
This could be alleviated by adding a CachingContainer when opening the publication, to cache the resources on the disk or in memory.
Postponed for now.
Related to readium/mobile#40 and #652