Open
Description
I'm seeing slow first queries against an database loaded via XHR. All the queries are fairly trivial, and after the first they complete quickly. Here's a picture of the chrome dev-tools:
Firefox (58.0.2) doesn't have this problem, so perhaps something browser related?
The following JS recreates this:
let db = null;
let experimentUrl = 'https://storage.googleapis.com/axelbrooke-public/experiments/toxic-comment-clf/experiments.sqlite';
(function() {
let xhr = new XMLHttpRequest();
xhr.open('GET',
experimentUrl,
true);
xhr.responseType = 'arraybuffer';
xhr.onload = function (e) {
let uInt8Array = new Uint8Array(this.response);
db = new SQL.Database(uInt8Array);
console.log(new Date(), 'Database created.');
console.log(queryDb('SELECT * FROM hparams'));
console.log(new Date(), 'Database loaded.');
app();
};
xhr.send();
})();
Metadata
Metadata
Assignees
Labels
No labels