1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Chore: Clean up unused fuzzy search code (#4593)

This commit is contained in:
Naveen M V
2021-03-11 03:57:45 +05:30
committed by GitHub
parent ec99511397
commit 3657c0369e
5 changed files with 24 additions and 195 deletions

View File

@@ -732,22 +732,6 @@ export default class BaseApplication {
this.database_.setLogExcludedQueryTypes(['SELECT']);
this.database_.setLogger(globalLogger);
// if (Setting.value('env') === 'dev') {
// if (shim.isElectron()) {
// this.database_.extensionToLoad = './lib/sql-extensions/spellfix';
// }
// } else {
// if (shim.isElectron()) {
// if (shim.isWindows()) {
// const appDir = process.execPath.substring(0, process.execPath.lastIndexOf('\\'));
// this.database_.extensionToLoad = `${appDir}/usr/lib/spellfix`;
// } else {
// const appDir = process.execPath.substring(0, process.execPath.lastIndexOf('/'));
// this.database_.extensionToLoad = `${appDir}/usr/lib/spellfix`;
// }
// }
// }
await this.database_.open({ name: `${profileDir}/database.sqlite` });
// if (Setting.value('env') === 'dev') await this.database_.clearForTesting();
@@ -774,19 +758,6 @@ export default class BaseApplication {
setLocale(Setting.value('locale'));
}
// if (Setting.value('db.fuzzySearchEnabled') === -1) {
// const fuzzySearchEnabled = await this.database_.fuzzySearchEnabled();
// Setting.setValue('db.fuzzySearchEnabled', fuzzySearchEnabled ? 1 : 0);
// }
// // Always disable on CLI because building and packaging the extension is not working
// // and is too error-prone - requires gcc on the machine, or we should package the .so
// // and dylib files, but it's not sure it would work everywhere if not built from
// // source on the target machine.
// if (Setting.value('appType') !== 'desktop') {
// Setting.setValue('db.fuzzySearchEnabled', 0);
// }
// For now always disable fuzzy search due to performance issues:
// https://discourse.joplinapp.org/t/1-1-4-keyboard-locks-up-while-typing/11231/11
// https://discourse.joplinapp.org/t/serious-lagging-when-there-are-tens-of-thousands-of-notes/11215/23