Recent

Author Topic: LHelp loads index only for first chm, but why?  (Read 1489 times)

Andrey Sobol

  • New Member
  • *
  • Posts: 48
LHelp loads index only for first chm, but why?
« 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?

Andrey Sobol

  • New Member
  • *
  • Posts: 48
Re: LHelp loads index only for first chm, but why?
« Reply #1 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.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9085
  • FPC developer.
Re: LHelp loads index only for first chm, but why?
« Reply #2 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.

Andrey Sobol

  • New Member
  • *
  • Posts: 48
Re: LHelp loads index only for first chm, but why?
« Reply #3 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

Andrey Sobol

  • New Member
  • *
  • Posts: 48
Re: LHelp loads index only for first chm, but why?
« Reply #4 on: December 08, 2020, 11:04:41 pm »
The patch for indexes combining was placed.
https://bugs.freepascal.org/view.php?id=38028

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9085
  • FPC developer.
Re: LHelp loads index only for first chm, but why?
« Reply #5 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.

Andrey Sobol

  • New Member
  • *
  • Posts: 48
Re: LHelp loads index only for first chm, but why?
« Reply #6 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.

Andrey Sobol

  • New Member
  • *
  • Posts: 48
Re: LHelp loads index only for first chm, but why?
« Reply #7 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

 

TinyPortal © 2005-2018