summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2022-11-09 14:31:40 -0500
committerGalen Guyer <galen@galenguyer.com>2022-11-09 14:31:40 -0500
commitc5a16a6e6e5d7f69c45d1bb9d07494bf4a9eb55a (patch)
treee4bc5ae70ece07908ab8c86b599a9edbd1b843f4
parent02f49120a3eabe2f855f219682a3fb0fd987db85 (diff)
Make chunks larger and fix titlemistress
-rw-r--r--package.json1
-rw-r--r--public/index.html3
-rw-r--r--public/optimize.sql9
-rwxr-xr-xpublic/split-db.sh4
-rw-r--r--src/App.js2
5 files changed, 14 insertions, 5 deletions
diff --git a/package.json b/package.json
index 904fc72..6c2ed5b 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,7 @@
"scripts": {
"start": "webpack-dev-server --mode development",
"build": "NODE_ENV=production webpack",
+ "publish": "rsync -avzh --delete --progress dist/ root@$MONTANA_IP:/var/www/k9fgt.me/",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
diff --git a/public/index.html b/public/index.html
index d0bcf17..dd0b11a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -3,9 +3,10 @@
<html>
<head>
+ <title>FCC Database Query Tool</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <title>React Starter</title>
+ <meta name="description" content="FCC Database Query Tool by K9FGT" />
</head>
<body>
diff --git a/public/optimize.sql b/public/optimize.sql
new file mode 100644
index 0000000..595d114
--- /dev/null
+++ b/public/optimize.sql
@@ -0,0 +1,9 @@
+.timer on
+.echo on
+
+pragma journal_mode = delete;
+-- pragma page_size = 1024;
+pragma page_size = 32768;
+
+vacuum;
+REINDEX;
diff --git a/public/split-db.sh b/public/split-db.sh
index e43b131..418ff52 100755
--- a/public/split-db.sh
+++ b/public/split-db.sh
@@ -6,8 +6,8 @@ outdir="$2"
# for chunked mode, we need to know the database size in bytes beforehand
bytes="$(stat --printf="%s" "$indb")"
-# set chunk size to 4MiB (needs to be a multiple of the `pragma page_size`!)
-serverChunkSize=$((4 * 1024 * 1024))
+# set chunk size to 8MiB (needs to be a multiple of the `pragma page_size`!)
+serverChunkSize=$((8 * 1024 * 1024))
suffixLength=4
rm -f "$outdir/db.sqlite3"*
split "$indb" --bytes=$serverChunkSize "$outdir/db.sqlite3." --suffix-length=$suffixLength --numeric-suffixes
diff --git a/src/App.js b/src/App.js
index 061dd1b..614cce2 100644
--- a/src/App.js
+++ b/src/App.js
@@ -76,8 +76,6 @@ export default function App() {
: undefined
}
onChange={(value, viewUpdate) => {
- localStorage.setItem('query', value);
-
const state = viewUpdate.state.toJSON(stateFields);
localStorage.setItem('editorState', JSON.stringify(state));