News for hackers. Stuff that matters.
Re:KSP2 is spamming the Windows Registry until the game stop... by dataflow on Monday September 25, 2023 @06:14PM (#37651445)
What are you comparing against here that's leading you to a different opinion? Are you claiming file I/O would be faster or that you could write the equivalent functionality faster?

Also note that performance isn't just speed either.

Re:KSP2 is spamming the Windows Registry until the game stop... by vardump on Monday September 25, 2023 @06:22PM (#37651540)
For example SQLite is superior. That said, on Windows you kinda have to use registry, especially on the kernel driver level.
Re:KSP2 is spamming the Windows Registry until the game stop... by dataflow on Monday September 25, 2023 @07:57PM (#37652453)
> For example SQLite is superior.

First... where are you getting this from? I just spent half an hour writing a an incredibly simple benchmark and all I see is SQLite being something like 20x slower than a registry query, seemingly caused by repeated locking & I/O system calls. This is on a trivial database with just 1 table with just 1 row, vs. a registry that's on a machine that's been running for years. If you have a benchmark that can disable the locking and get comparable performance, I'd love to see it. Not that it would mean anything though, given the next point.

Second, even if it were somehow faster... you'd be comparing apples to oranges. The registry has a bunch of things SQLite isn't designed for: security integration with the rest of the OS, a hierarchical structure, OS hooks for monitoring & interception, multithreaded access, etc. Have you tried doing these with SQLite before praising how fast it is?

> That said, on Windows you kinda have to use registry, especially on the kernel driver level.

Is it common for drivers to use SQLite to store configuration information in any OS? I dare say I've never seen this.

Re:KSP2 is spamming the Windows Registry until the game stop... by vardump on Tuesday September 26, 2023 @01:18AM (#37654759)
"Is it common for drivers to use SQLite to store configuration information in any OS? I dare say I've never seen this."

It's not. You're going to use your assigned registry hive for it.