ACE hangs or times out when processing EPUBs with very large package.opf manifest and spine
- Dominant language
- JavaScript
- Stars
- 98
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
I have encountered an issue when processing an EPUB file using ACE where the tool hangs or runs indefinitely due to the size of the package.opf. The file contains:
- Over 20,000 items in the `` (`/package/manifest/item`)
- Over 1,600 `` entries in the (`/package/spine/itemref`)
While analyzing the code, I noticed that the issue seems to stem from the parseData function in `epub-parse.js` (specifically EpubParser.prototype.parseData). It appears that the time taken to process each `` in the `` increases significantly, eventually leading to timeouts or the validator running indefinitely.
This is blocking us from validating large-scale EPUB content using ACE.
Request:
Is there any known workaround or possible fix for this issue? Could ACE be improved to handle large EPUB files?
Contributor guide
Research direction
Inspect EpubParser.prototype.parseData in epub-parse.js and reproduce the slowdown with an EPUB containing very large manifest and spine entries. Profile the per-itemref processing to identify the scaling problem; done means ACE validates these large EPUBs without hanging or timing out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100