Lazarus

Miscellaneous => Documentation (Maintaining -) => Topic started by: Andrey Sobol on December 03, 2020, 02:45:31 pm

Title: LHelp loads index only for first chm, but why?
Post by: Andrey Sobol on December 03, 2020, 02:45:31 pm
If I set ON - "load all chm in single tab".
I see that into unit chmcontentprovider line 587, but why?
Quote
    // we fill the index here too but only for the main file
    if fChms.IndexOfObject(CHMReader) < 1 then             
May be that is only for to do later?
Can anyone to say more?
Title: Re: LHelp loads index only for first chm, but why?
Post by: Andrey Sobol on December 04, 2020, 10:09:02 pm
I have made first version of a redone. A combine of all indexes from the lazarus chm directory takes 1.5 sec. I think that is fine. It is with sorting the entire index tree by top level.
Title: Re: LHelp loads index only for first chm, but why?
Post by: marcov on December 04, 2020, 10:42:22 pm
That's about right, that is how long it takes the textmode IDE too.

You can /MAYBE/ shave off some time by keeping everything widestring.
Title: Re: LHelp loads index only for first chm, but why?
Post by: Andrey Sobol on December 05, 2020, 07:56:39 am
That's about right, that is how long it takes the textmode IDE too.
I see you last worked with CHM packages...
May be you will fix my patch?
https://bugs.freepascal.org/view.php?id=38169
Title: Re: LHelp loads index only for first chm, but why?
Post by: Andrey Sobol on December 08, 2020, 11:04:41 pm
The patch for indexes combining was placed.
https://bugs.freepascal.org/view.php?id=38028 (https://bugs.freepascal.org/view.php?id=38028)
Title: Re: LHelp loads index only for first chm, but why?
Post by: marcov on December 09, 2020, 08:06:47 am
Note that it would be much faster to combine the binary indexes. (basically a merged of b+trees, at worst a merge sort).

Code for that would be nice in package chm, to keep it IDE independent.  In theory you could write out that combined index even, there is even a (MS) extension for that; .CHW which is a modified chm variant.
Title: Re: LHelp loads index only for first chm, but why?
Post by: Andrey Sobol on December 09, 2020, 10:10:18 am
Code for that would be nice in package chm, to keep it IDE independent.  In theory you could write out that combined index even, there is even a (MS) extension for that; .CHW which is a modified chm variant.
I think about that, but now we have nothing.
Title: Re: LHelp loads index only for first chm, but why?
Post by: Andrey Sobol on December 23, 2020, 07:37:47 pm
I have placed a redone version of lHelp
I will be glad if someone takes it fot check and place into repo.
https://bugs.freepascal.org/view.php?id=38250 (https://bugs.freepascal.org/view.php?id=38250)
TinyPortal © 2005-2018