Skip to content

ACE hangs or times out when processing EPUBs with very large package.opf manifest and spine #441

@bharathydasanm

Description

@bharathydasanm

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 <manifest> (/package/manifest/item)
  • Over 1,600 <itemref> 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 <itemref> in the <spine> 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions