Git Product home page Git Product logo

Comments (5)

renggli avatar renggli commented on August 25, 2024 1

Ultimately you should probably ask in a Flutter forum how to run and debug computationally expensive operations.

However, I suspect in your case the problem it is not only the time it takes to read the file, but also the size of the data. A typical solution is to use an event-based reader xml_events.dart that can incrementally (non-blocking) read the input and does not keep the complete document tree in memory.

If this is not an option, I recommend converting the XML file to a DB as part of the build process.

from dart-xml.

PiN73 avatar PiN73 commented on August 25, 2024 1

So if I understand correctly, the problem is not XML parsing but passing huge objects list.

In this case local database may be useful. I.e. isolate saves data to db after parsing, and then you query data on demand

from dart-xml.

PiN73 avatar PiN73 commented on August 25, 2024

@soska12 this approach works for me

from dart-xml.

soska12 avatar soska12 commented on August 25, 2024

@soska12 this approach works for me

yes with small amount of that that works, but with a file with 600k+ lines it also freezes the UI when passing data back from isolate.

from dart-xml.

renggli avatar renggli commented on August 25, 2024

I am closing this issue, because — as far as I can understand — there is nothing I can do here.

from dart-xml.

Related Issues (20)

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.