Giter Club home page Giter Club logo

Comments (10)

thevikke avatar thevikke commented on August 11, 2024 2

UPDATE:

Well I did some research with a 144 pages long pdf document. I tested the aforementioned Voice Aloud Reader, which parsed the text from the document in around 34 seconds. Our package in debug mode parsed the same document in 2:05. Which is about a minute and a half longer. If running with release mode the time drops to around 1:30, which is better but still far from the Aloud Reader. All tests were ran on the same device.

Now I do not know why this is happening, since Voice Aloud Reader and this package use the same Android PdfBox library to parse the text. Maybe Flutter creates some friction, I don't know. Maybe there is some optimization to be done with the Android code of this package. The only advice I can give at this point is, that running Flutter in release mode significantly speeds up the parsing process (25%).

I will do some refactoring to try improve the performance in near future, but that might take awhile, since I also work and study at the same time. So don't hold your breath.

from read_pdf_text.

thevikke avatar thevikke commented on August 11, 2024 1

I guess you can clone the repo. Check the Android code for performance improvements, or you can try upgrading the PdfBox version: implementation 'com.tom-roush:pdfbox-android:2.0.25.0'. From https://github.com/TomRoush/PdfBox-Android.

from read_pdf_text.

thevikke avatar thevikke commented on August 11, 2024 1

We are running the Pdfbox parser in a isolate, so that it doesn't lock the UI thread during PDF-parsing. However, I'm no Android developer so there might be performance improvements to be made.

I may have some time next week to look into this issue. If you are not able to?

from read_pdf_text.

thevikke avatar thevikke commented on August 11, 2024

Do you mean that it is slow on iOS, but faster on Android?

from read_pdf_text.

vinhbui1 avatar vinhbui1 commented on August 11, 2024

Thanks for reply me. No . it slows on Flutter, It is faster in Android Native (Not Flutter)

from read_pdf_text.

thevikke avatar thevikke commented on August 11, 2024

This package uses Pdfbox plugin on Android. I was not aware there is native Android API for parsing PDF documents. What is it called?

from read_pdf_text.

vinhbui1 avatar vinhbui1 commented on August 11, 2024

I mean, I found an app in ChPlay very fast when converting Pdf to text offline. (The same PDF file I used in your library took me 2 minutes, but in this app only takes 5s) Can we investigate it?
https://play.google.com/store/apps/details?id=com.hyperionics.avar&hl=vi&gl=US

from read_pdf_text.

thevikke avatar thevikke commented on August 11, 2024

Seems to me that application is also using PdfBox paclage for parsing. So it is the same package as we use.

from read_pdf_text.

vinhbui1 avatar vinhbui1 commented on August 11, 2024

Hi @thevikke can we use isolate in this package to improve performance? Sorry if the question is not good. I am just a beginner. Thanks

from read_pdf_text.

vinhbui1 avatar vinhbui1 commented on August 11, 2024

Pls, help me take a look. Thanks

from read_pdf_text.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.