diff options
| -rw-r--r-- | org/out_src_abstraction_sqlite_db.org | 11 | ||||
| -rw-r--r-- | src/sisudoc/ocda/abstraction/ssp.d | 11 | ||||
| -rw-r--r-- | src/sisudoc/outputs/io_out/create_abstraction_db.d | 11 |
3 files changed, 19 insertions, 14 deletions
diff --git a/org/out_src_abstraction_sqlite_db.org b/org/out_src_abstraction_sqlite_db.org index 31bb7ab..0b477c1 100644 --- a/org/out_src_abstraction_sqlite_db.org +++ b/org/out_src_abstraction_sqlite_db.org @@ -73,8 +73,15 @@ template spineAbstractionDb() { /+ ↓ open database and create schema +/ auto db = Database(db_file); - db.run("PRAGMA journal_mode=WAL"); - db.run("PRAGMA synchronous=NORMAL"); + /+ ↓ write once, read many: no WAL. + a WAL stamped file cannot be opened by a reader that cannot write + beside it (SQLITE_READONLY on a read-only directory, and inside a + zip or on read-only media), and this database has one writer and no + concurrency, so WAL buys nothing here. MEMORY journal keeps the bulk + load fast without leaving that mark on the file. + +/ + db.run("PRAGMA journal_mode=MEMORY"); + db.run("PRAGMA synchronous=OFF"); db.run(" CREATE TABLE metadata ( diff --git a/src/sisudoc/ocda/abstraction/ssp.d b/src/sisudoc/ocda/abstraction/ssp.d index fc7dbd3..5e9347f 100644 --- a/src/sisudoc/ocda/abstraction/ssp.d +++ b/src/sisudoc/ocda/abstraction/ssp.d @@ -315,9 +315,6 @@ template spineAbstractionTxt() { if (obj.metainfo.object_number_off) { output ~= ".ocn_off: true"; } - // if (obj.metainfo.o_n_type != 0) { - // output ~= ".o_n_type: " ~ obj.metainfo.o_n_type.to!string; - // } if (obj.metainfo.is_of_type.length > 0) { output ~= ".is_of_type: " ~ obj.metainfo.is_of_type; } @@ -402,16 +399,10 @@ template spineAbstractionTxt() { } if (obj.table.heading) { output ~= ".table_header: true"; - } - // if (obj.table.walls) { - // output ~= ".table_walls: true"; - // } + } } /+ ↓ code block properties +/ if (obj.metainfo.is_a == "code") { - // if (obj.code_block.syntax.length > 0) { - // output ~= ".code_syntax: " ~ obj.code_block.syntax; - // } if (obj.code_block.linenumbers) { output ~= ".code_linenumbers: true"; } diff --git a/src/sisudoc/outputs/io_out/create_abstraction_db.d b/src/sisudoc/outputs/io_out/create_abstraction_db.d index ba83736..d1f3f53 100644 --- a/src/sisudoc/outputs/io_out/create_abstraction_db.d +++ b/src/sisudoc/outputs/io_out/create_abstraction_db.d @@ -91,8 +91,15 @@ template spineAbstractionDb() { /+ ↓ open database and create schema +/ auto db = Database(db_file); - db.run("PRAGMA journal_mode=WAL"); - db.run("PRAGMA synchronous=NORMAL"); + /+ ↓ write once, read many: no WAL. + a WAL stamped file cannot be opened by a reader that cannot write + beside it (SQLITE_READONLY on a read-only directory, and inside a + zip or on read-only media), and this database has one writer and no + concurrency, so WAL buys nothing here. MEMORY journal keeps the bulk + load fast without leaving that mark on the file. + +/ + db.run("PRAGMA journal_mode=MEMORY"); + db.run("PRAGMA synchronous=OFF"); db.run(" CREATE TABLE metadata ( |
