Help: Take 150 seconds to parse
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 394
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 7
Description
I'm trying to process this document - http://imwerden.de/pdf/bocharov_roman_tolstogo_vojna_i_mir_1978__ocr.pdf and it takes +-150 seconds.
Why so long ? Speed depends on font type ?
Also similar size pdf (http://gsl.mit.edu/media/programs/south-africa-summer-2015/materials/0to1.pdf) processed for 5 seconds.
const parsePdf = (filePath) => {
let pdfParserRawText = new PDFParser(this,1);
pdfParserRawText.loadPDF(filePath);
return new Promise((resolve, reject) => {
pdfParserRawText.on('pdfParser_dataError', errData => {
reject(new Error(errData.parserError));
});
pdfParserRawText.on('pdfParser_dataReady', pdfData => {
const rawText = pdfParserRawText.getRawTextContent();
resolve(rawText);
});
});
};
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start at PDFParser.loadPDF and getRawTextContent in the provided parsePdf entry point, then compare processing of the two linked PDFs while profiling the parser. Done means identifying and documenting the cause of the large timing difference, or narrowing it to a specific parsing stage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100