2

im currently writing a electron App. I wanted to use a SQLite Datebase to store some data. I got a Code like this:

            var startTime = performance.now()
        let sql = `UPDATE entry
            SET
                title = "someData",
                url = "someData",
                username = "someData",
                password = "someData",
                email = "someData",
                note = "someData",
                dateOfLastModification = "someData"
            WHERE id=someId;`;
        this.database.run(sql, (err, data) => {
            if (err) {
                console.log(err);
            } else {
                var endTime = performance.now()
                console.log(`Call to updateEntry took ${endTime - startTime} milliseconds`)
            }
        });

Every time i call this code it, it needs more than 200ms. Isnt this too long for such a easy Query? I got other Queries that need nearly the same time. So if i got a behavior in my app that executes three Queries the user have to wait nearly 1 sec.

Any tips what im doing wrong?

Lammers
  • 21
  • 2

0 Answers0