Giter Club home page Giter Club logo

Comments (7)

WhyNotHugo avatar WhyNotHugo commented on July 26, 2024 1

I think it's a bad idea to expose SQL queries.

They will only be used internally. The sorting command and all the cli commands in general will remain the same.

from todoman.

WhyNotHugo avatar WhyNotHugo commented on July 26, 2024

I'm currently working on this, and re-writing the whole model backend, so I'd suggest not doing intensive works in those areas in the meantime.

from todoman.

untitaker avatar untitaker commented on July 26, 2024

I think it's a bad idea to expose SQL queries.

from todoman.

WhyNotHugo avatar WhyNotHugo commented on July 26, 2024

I had to dump all this, since I'd not considered recurring events. The rewrite will have to take this into consideration.

from todoman.

untitaker avatar untitaker commented on July 26, 2024

We now have two caches:

  • A JSON object that maps ids to filenames
  • A pickled dict that caches all .ics files

Can we close this issue?

from todoman.

WhyNotHugo avatar WhyNotHugo commented on July 26, 2024

The idea behind this is to cache all these fields in a small sqlite db, and simply use SQL to filter (not exposing this to the user, of course). This makes the code on #68 a lot friendlier.

Since we only use these fields in list(), we don't even need to read files themselves (except out-of-date cache) except when edition/viewing a single todo.

Also, it means that we can keep ids valid for much longer times (since we can persist them there too). I'd eventually re-compute them on flush().


Edit: I've actually some work done on this, but since it's not 100%, it's mostly broken. :(

from todoman.

untitaker avatar untitaker commented on July 26, 2024

Persisting IDs may be a bit annoying because those will eventually become larger, and therefore be harder to type.

from todoman.

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.