Nathanael (Nate) Maytan

Results 14 comments of Nathanael (Nate) Maytan

No great insights yet, but I've made progress tracing these blocks of syscalls to where they're coming from in Tiled. Ultimately the subprocesses are opened by the `await`'d sqlalchemy methods....

This may be the issue: pre-2.0 sqlalchemy [did not use connection pooling by default](https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html#the-sqlite-dialect-uses-queuepool-for-file-based-databases) for sqlite databases. As of 2.0, it should by default use `sqlalchemy.pool.QueuePool` - but QueuePool does...

Oh - it seems that aiosqlite is a bit different, and defaults to `NullPool` - [see here](https://github.com/sqlalchemy/sqlalchemy/blob/e3f7bc683ac3ea6d7c517b9c7ffeaa911860d732/lib/sqlalchemy/dialects/sqlite/aiosqlite.py#L233). So, mystery solved. I guess the other thing to do, is consider if...

Agreed that the specific thing opening these subprocesses is mysterious. I've briefly combed through sqlalchemy and aiosqlite and haven't found anything that looks suspicious. What's also strange is that strace...

Okay, I'm becoming convinced that this _is_ `aiosqlite`'s doing. It creates a new thread per connection, so without connection pooling each reconnection means it will make a new thread. A...

Even more convincing: ``` In [26]: r = await aiosqlite.connect('test.db') In [27]: r.native_id Out[27]: 120553 ``` ``` strace: Process 120553 attached [pid 120553] 18:09:26.444991 openat(AT_FDCWD, "/home/nmaytan/test.db", O_RDWR|O_CREAT|O_NOFOLLOW|O_CLOEXEC, 0644) = 12...

In trying to gather some of the community consensus re: pooling sqlite connections, here is an attempted summary of that plus related details. 1. We are using WAL on the...

Correction: I had misunderstood that asv was running against the version of tiled installed in my environment, and not against the local repository I was working in. Now performing _proper_...

Would using [psutils](https://psutil.readthedocs.io/en/latest/#psutil.disk_partitions) be a better choice for grabbing filesystem details? Granted, it's a little less direct (needs some path-checking logic which accounts for nested mounts), but avoids subproc and...