Git Product home page Git Product logo

Comments (3)

eyeonus avatar eyeonus commented on July 4, 2024

The script only works on listings.csv, whereas the plugin also needs to import listings-live.csv

The script doesn't check to make sure that the listings it's checking to import is newer than the listing it would replace, it just inserts or replaces everything. If the data in the DB is newer than the data from the import file, it should be skipping that item, and it isn't.

What should be done, and hasn't mainly due to lack of time, is to not perform each transaction individually, which is what is currently happening, but to push all the transactions into a list for an executemany call.

The biggest slowdown with the current method is that each transaction is done individually, so the DB gets opened, written, closed, open, written, closed, for every entry in the import file.

It's the constant opening and closing that is the biggest slowdown.

I originally wrote the plugin with literally 0 knowledge of SQLite3 beyond what I was Googling to get the thing to work, I just haven't gone back to redo the importing in a less stupid way.

TBH, every one of the import methods in the plugin really needs to be improved in the same manner.

from trade-dangerous.

aadler avatar aadler commented on July 4, 2024

Over my head, but there are some examples of executemany in cache.py if that helps.

from trade-dangerous.

aadler avatar aadler commented on July 4, 2024

This should probably be closed now due to 48686db, no?

from trade-dangerous.

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.