search.json.mozlz4

This board is for discussions, bug reports, etc. for pre-releases of the v28 milestone building on UXP.
Fedor2

search.json.mozlz4

Unread post by Fedor2 » 2018-07-20, 18:35

In the uxp this is replaces search.json the compression reduce the size yes, but removes means to edit it, is it really worth?
I see ways:
1. reinstate regular text search.json without compression.
2. improve search edit function in the browser which is now poor or even useless.

What do you think?

More there is the mozzila addon mozlz4_edit, but initially made for the web extensions, can be launched as page but does not recognize object browser, do not know why, no time to deep inquire.

Furthermore it is can to edit xml files in the borwser\seachplugins and delete search.json.mozlz4 in all users pofiles

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35602
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: search.json.mozlz4

Unread post by Moonchild » 2018-07-20, 19:12

The file search.json.mozlz4 (and search.json before that) is not a file you should ever edit -- it is a generated file with pre-parsed search engine data (a cache file). Since it only has to be machine-readable it makes sense to compress it for fast loading.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

JustOff

Re: search.json.mozlz4

Unread post by JustOff » 2018-07-20, 20:03

Fedor2 wrote:More there is the mozzila addon mozlz4_edit, but initially made for the web extensions, can be launched as page but does not recognize object browser, do not know why, no time to deep inquire.

Code: Select all

--- js\app\App.js.orig	Fri Jul 20 23:00:43 2018
+++ js\app\App.js	     Fri Jul 20 23:00:48 2018
@@ -49,7 +49,7 @@
     }
 
     async initEngineExamples() {
-        const url = browser.runtime.getURL('app/resources/engines.json');
+        const url = 'resources/engines.json';
 
         return this.engineExamples = await (await fetch(url)).json();
     }

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: search.json.mozlz4

Unread post by therube » 2018-07-21, 15:35

It took me some reading & thinking & reading & thinking.
And I'm thinking the extension is a webextension, which won't work in PM.
And then I did some reading & thinking.

And then I realized the pertinent part:
Fedor2 wrote:can be launched as page
And with JustOff's fix, it works.
Neat.


(IOW, copy the /app/ directory out from mozlz4-edit, make the noted change, open \app\app.htm as a webpage in PM.)


(The 'Save as' functions return an error.)
(Manipulating large files [~2 MB .json] is rather slow.)
Last edited by therube on 2018-07-21, 15:50, edited 4 times in total.

Locked