Bug 66148 - IDE object catalog latency on big libraries
Summary: IDE object catalog latency on big libraries
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: Other All
: medium normal
Assignee: Noel Power
URL:
Whiteboard: target:4.2.0 target:4.1.0.2 target:4.0.5
Keywords:
Depends on:
Blocks: mab4.0
  Show dependency treegraph
 
Reported: 2013-06-25 09:17 UTC by Laurent Godard
Modified: 2013-07-08 07:31 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
test extension (56.44 KB, application/zip)
2013-06-25 09:17 UTC, Laurent Godard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Godard 2013-06-25 09:17:08 UTC
Created attachment 81396 [details]
test extension

once the object catalog has been displayed (and even when hidden again), switching from a module tab to another takes many seconds on big extension

commenting this line, all becomes reactive
http://opengrok.libreoffice.org/xref/core/basctl/source/basicide/basides1.cxx#1035

filtering by 
if ( aObjectCatalog.IsVisible() )
does not solves the problem

there must be some hidden magic (listener ?)

here is attached an oxt containing 50 modules, 30 sub, 100 lines each showing the problem.

reproduced on master
Comment 1 Noel Power 2013-06-27 13:49:00 UTC
yes, 2 minutes or so of waiting switching between modules is unacceptable ( even though I know this is a really large Library ) It should be a MAB too I think ( need to see where this first appeared )

Some initial profiling and it seems that it is parsing the source for every method ( on updateentries ) to verify that it exists ( this seems particularly crazy ) - not sure if there is an easy solution I will look further
Comment 2 Noel Power 2013-06-27 13:59:40 UTC
(In reply to comment #1)
> yes, 2 minutes or so of waiting switching between modules is unacceptable
an exaggeration of course ( on my machine about 5 seconds with the oxt example ) of course this is still unacceptable for just switching between tabs
Comment 3 Noel Power 2013-06-27 14:30:27 UTC
17 seconds on master ( maybe because I have more things built in debug
Comment 4 Commit Notification 2013-06-27 15:43:52 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=61027ca6eb450fb20bfe9209ba180fe0606baeab

improve performance switching modules in large Libraries fdo#66148



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Laurent Godard 2013-06-27 20:35:31 UTC
the patch is ok regarding latency. The basic IDE is now responding well
but
the "object catalog" is not updated  if a new sub/function is added in a module
(even when switching forth and back to the module)

well, i can live with that ;-)

any backport possible to 3.6.x and/or 4.x branches ?

many thanks to Noel, (The) Power(full) !!!
Comment 6 Noel Power 2013-06-27 20:56:45 UTC
(In reply to comment #5)
> the patch is ok regarding latency. The basic IDE is now responding well
> but
> the "object catalog" is not updated  if a new sub/function is added in a
> module
> (even when switching forth and back to the module)
I don't see that (works for me), most likely I don't do the same steps as you, can you give me the *exact* steps to repoduce this
Comment 7 Noel Power 2013-06-27 21:01:34 UTC
(In reply to comment #6)
> I don't see that (works for me), most likely I don't do the same steps as
> you, can you give me the *exact* steps to repoduce this

just a thought are you using the old patch ( the one I first mentioned on irc ) or http://cgit.freedesktop.org/libreoffice/core/commit/?id=61027ca6eb450fb20bfe9209ba180fe0606baeab the corrected patch ( might explain why I don't see the problem )
Comment 8 Laurent Godard 2013-06-28 08:41:57 UTC
it was the right patch
i did not realize that my added function was alphabetically sorted

so, all is all for me
Comment 9 Noel Power 2013-06-28 09:11:18 UTC
backports for review

4.0 https://gerrit.libreoffice.org/4599
4.1 https://gerrit.libreoffice.org/4598
Comment 10 Commit Notification 2013-06-28 09:30:51 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d7dff2d677475c7e29e5340d0ebef8545aefd97&h=libreoffice-4-1

improve performance switching modules in large Libraries fdo#66148


It will be available in LibreOffice 4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2013-06-28 09:31:09 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7f50f4092b7beafa5545a9a783dde760b260df4c&h=libreoffice-4-0

improve performance switching modules in large Libraries fdo#66148


It will be available in LibreOffice 4.0.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.