ifcviewer: load RocksDB-backed IFC models

The viewer can now open a .rdb directory (as produced by
RocksDbSerializer / convert_path_to_rocksdb) anywhere it accepts an
.ifc file. The full GUI gets an "Add Database..." File menu entry
that opens a directory chooser; the streamer lets the file
constructor autodetect the format and opens the store read-only so
multiple viewers can share a database without taking the exclusive
RocksDB lock.

Parallel mapping on RocksDB-backed files still produces
non-deterministic shape counts (the race is outside the instance
cache), so force num_threads=1 for the iterator when the storage is
RocksDB. Serial RocksDB (~2.6s) and parallel SPF (~0.7s) both
produce 107 shapes on AC20-FZK-Haus; @todo in-source points at the
remaining thread-safety work.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-04-22 16:22:48 +10:00
parent 4f929e90a7
commit 35be7f4190
3 changed files with 23 additions and 2 deletions
+1
View File
@@ -48,6 +48,7 @@ public:
private slots:
void onFileOpen();
void onDatabaseOpen();
void onFileSettings();
void onObjectPicked(uint32_t object_id);
void onTreeSelectionChanged();