Discussion:
Is adding modules slow for anyone else?
Scott Kostyshak
2014-09-04 02:14:23 UTC
Permalink
Sometimes when I click on "Add" in the document settings module tab,
LyX lags just a tad (e.g. 1 second). It does not happen all the time
and the lag is not much but it makes me wonder what is taking so much
computation. My computer is not super fast and I am using a devel
build, but relative to other parts of LyX, it feels a little slow to
me.

One thing I've noticed is that every time I click "Add",
updateModuleInfo() is called three times. I have not investigated much
beyond that and thought I would check in here first to see if (1)
anyone else has noticed this or I am just being picky/ I have a slow
computer; and (2) if anyone has an idea why it is slow.

Scott
Richard Heck
2014-09-04 14:19:10 UTC
Permalink
Post by Scott Kostyshak
Sometimes when I click on "Add" in the document settings module tab,
LyX lags just a tad (e.g. 1 second). It does not happen all the time
and the lag is not much but it makes me wonder what is taking so much
computation. My computer is not super fast and I am using a devel
build, but relative to other parts of LyX, it feels a little slow to
me.
One thing I've noticed is that every time I click "Add",
updateModuleInfo() is called three times. I have not investigated much
beyond that and thought I would check in here first to see if (1)
anyone else has noticed this or I am just being picky/ I have a slow
computer; and (2) if anyone has an idea why it is slow.
Are these modules in the recent layout format? Maybe some layout2layout
conversion takes time.
I'm not sure why updateModuleInfo() gets called three times, but I've seen
such redundancies before. The other thing that's happening, though, that
Jurgen is basically pointing out, is that we rebuild the DocumentClass each
time a module is added. We have to do this to reset various things in the
dialog that the module might change. (E.g., the module might make other
modules available, or exclude them.)

I think hunting down the source of the redundancies would be worthwhile.

Richard
Scott Kostyshak
2014-09-04 20:19:15 UTC
Permalink
Post by Richard Heck
Post by Scott Kostyshak
Sometimes when I click on "Add" in the document settings module tab,
LyX lags just a tad (e.g. 1 second). It does not happen all the time
and the lag is not much but it makes me wonder what is taking so much
computation. My computer is not super fast and I am using a devel
build, but relative to other parts of LyX, it feels a little slow to
me.
One thing I've noticed is that every time I click "Add",
updateModuleInfo() is called three times. I have not investigated much
beyond that and thought I would check in here first to see if (1)
anyone else has noticed this or I am just being picky/ I have a slow
computer; and (2) if anyone has an idea why it is slow.
Are these modules in the recent layout format? Maybe some layout2layout
conversion takes time.
I'm not sure why updateModuleInfo() gets called three times, but I've seen
such redundancies before. The other thing that's happening, though, that
Jurgen is basically pointing out, is that we rebuild the DocumentClass each
time a module is added. We have to do this to reset various things in the
dialog that the module might change. (E.g., the module might make other
modules available, or exclude them.)
I think hunting down the source of the redundancies would be worthwhile.
Thanks for the insights Jürgen and Richard. I will add this to my list
of things to look into but since it's more complicated than I thought,
I wouldn't be surprised if it takes me a while to get to. At least I
should be able to figure out where the time is spent, even if a
solution is not easy.

Scott

Loading...