Help: Take 150 seconds to parse
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- backend, performance
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.
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);
});
});
};
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 396
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from modesty/pdf2json
-
getRawTextContent() returns the lines of every page in reverse order (bottom to top) since 4.0.3Open
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
`getRawTextContent` does not returns words' pieces in proper coordinate orderPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in modesty/pdf2json
Similar issues
-
Area-UIUX Issue-Bug Issue-Easy (good first issue)
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
TeamAmaze/AmazeFileManager#4769 ·
Maintainers usually reply within 7 days
-
Expose SManga.memo & SChapter.memo fields in GraphQL APIs to support source-specific client featuresOpenenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Suwayomi/Suwayomi-Server#2551 ·
Maintainers usually reply within 9 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ShaftHQ/SHAFT_ENGINE#7861 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
MetricsHub/metricshub-community#1532 ·
Maintainers usually reply within 1 day