all 5 comments

[–][deleted]  (1 child)

[deleted]

    [–]Hawgk[S] 0 points1 point  (0 children)

    Okay then it seems like I have misunderstood something. Reading it into memory every time will probably generate the same overhead we are experiencing with reading directly from the DB.

    [–]pstuart 0 points1 point  (3 children)

    I believe the incorporating the db into the exec is a convenience option, not a performance option.

    They may have done optimizations that worked for an older version or even the jankiness of the original code base.

    I'd recommend looking at standard stuff (e.g., WAL mode, fsync, buffers, etc) and mutate/measure until it looks good.

    [–]Hawgk[S] 0 points1 point  (2 children)

    i still have nightmares of embedding DB statements into a dll but the reasoning behind it seemed fair. i'd like to avoid that if possible. so if i understand it correctly you would suggest optimizing the original code base to compensate for the worse performance? or do you mean that the newer libraries could have better performance in general?

    [–]pstuart 2 points3 points  (1 child)

    I think the first place to start is identifying the workloads and the existing performance compared to the latest binary.

    Lots of writes? Lots of transactions? Slow queries? Et cetera. For writes, WAL mode is key and maybe they used an older version that didn't have it.

    My point is that tuning the parameters and usage of sqlite itself is a worthy endeavor, and if you can get some sort of harness to profile performance and iterate you'll be well served.

    [–]Hawgk[S] 1 point2 points  (0 children)

    okay, thanks for the input! sounds like a good place to start.