Re: Can LyX handle large files ?

2006-11-12 Thread Timothy Reaves

Would you people please stop cross posting!



Re: Can LyX handle large files ?

2006-11-12 Thread Andre Poenitz
On Tue, Nov 07, 2006 at 12:14:46PM +0100, Abdelrazak Younes wrote:
> I've tested again this document and the good news is that the 
> performance will soon be a bit better in 1.5 with my forthcoming 
> painting performance patch. But the problem I think Georg is right in 
> that the problem lies in how lines and symbols are painted on screen 
> with mathed.

While this might be true, it is also a fact that math painting has not
significantly changed since 1.2.0, in fact, this was the first component
using two-phase-drawing. So it is a bit strange that nowadays it shuld
be suddenly the bottleneck.

Andre' 


Re: Can LyX handle large files ?

2006-11-12 Thread Andre Poenitz
On Tue, Nov 07, 2006 at 04:43:07PM +0100, Abdelrazak Younes wrote:
> As my painting investigation continue, it seems that this problem has 
> _nothing_ to do with painting on screen at all. Modifying a text line 
> between two huge formula exhibits the slow behaviour even if only the 
> text line is repainted on screen (you can use "-dbg painting" to make 
> sure of that.

As I said. Mathed is essentially uchanged since 1.2.0. It was completely
different before, but speed was acceptable in the 1.2.x and 1.3.x
series. So whatever triggers that behaviour is some recent interaction.

Note that I am not saying the data model is perfect, especially since
I changed my stance about reference counting and deep copies vs COW
lately.

> I guess this could be related to the data memory models used in mathed. 
> Maybe some big tables created/deleted on the fly?

Hm... the macro tables?

> Also, this comment from Michael Wojcik* makes me wonder if maybe mathed 
> does something special with lyxerr... any clue someone?

We should have a macro encapsulating lyxerr that guarantees minimal
overhead...

> "So, for example, if LyX were running with debug enabled, the debug
> lines being written to the LyX console window might cause a noticeable
> jump in csrss load.  But I haven't tested that."

[Console output is terribly slow on Windows btw.]

Andre'


Re: Can LyX handle large files ?

2006-11-10 Thread gumm

A final word on the situation with LyX and large files:

I deinstalled LyX 1.4.2 and 1.4.3 and went back to LyX 1.3.7 and the
problems essentially disappeared. I conclude that several bugs must have
been introduced in going from 1.3 to 1.4

+ In 1.3.7 I can start editing immediately. After some time
  instant preview kicks in and I can happily continue editing
  and scrolling while seeing the nice snippets.

- In 1.4.3, shortly after loading the file, everything freezes
  ("LyX not responding") for 3-4 minutes. Even after that waiting
  time, instant preview snippets are only shown for the current page.
  Scrolling is almost impossible, since it only works by half a page
  at a time, then waiting several seconds for the next snipets, then
  the next half page, etc.. Essentially impossible to move around.

A second bug that I had almost gotten used to in 1.4.x, but now I recall
that it had not been present in 1.3.x:

+ In 1.3.7, after changing some math, and after leaving the math
  environment, the snippet is correctly updated instantly.

- In 1.4.2 and in 1.4.3 it often happens that I edit some math,
  leave the environment and the old snippet is still shown. I must
  enter the math environment again, just move the cursor a bit and
  leave the environment again, before the snippet is correctly updated.
  I recall that another user has reported this in this list, too.

I admit that I have the usual amount of math in my paper, but I should not
need to apologize for that. I use xy-pic a lot to draw commutative
diagrams. My paper has some 65 pages by now and I to my amazement, I found
1590 (1-5-9-0) pngs in
   \Lokale Einstellungen\Temp\lyx_tmpdir3332a02116\lyx_tmpbuf0

Greetings,
 H.Peter

>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
>
> Abdelrazak> I've tested again this document and the good news is that
> Abdelrazak> the performance will soon be a bit better in 1.5 with my
> Abdelrazak> forthcoming painting performance patch. But the problem I
> Abdelrazak> think Georg is right in that the problem lies in how lines
> Abdelrazak> and symbols are painted on screen with mathed.
>
> It would be interesting to know whether the situation improves when
> the TeX fonts are unavailable. This is the only difference I can think
> of between math and non-maths. It may be that these fonts are
> expensive to handle.
>
> JMarc
>



Re: Can LyX handle large files ?

2006-11-07 Thread Georg Baum
Am Dienstag, 7. November 2006 16:07 schrieb Abdelrazak Younes:
> Georg Baum wrote:
> > Abdelrazak Younes wrote:
> > 
> >> Jean-Marc Lasgouttes wrote:
> >>> It would be interesting to know whether the situation improves when
> >>> the TeX fonts are unavailable. This is the only difference I can 
think
> >>> of between math and non-maths. It may be that these fonts are
> >>> expensive to handle.
> > 
> > That could be easily checked by letting symbolFamily() in 
GuiFontLoader.C
> > return an empty string. That disables all symbol fonts.
> 
> I've checked that. Without the symbolFamily(), all Greek symbols are 
> replaced with their ascii names in red.

Yes, that is what happens if the fonts are not available.

> Unfortunately that doesn't solve the problem. I still have csrss.exe 
> eating 50% of the CPU... :-(

Too bad.


Georg



Re: Can LyX handle large files ?

2006-11-07 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:


Abdelrazak> I've tested again this document and the good news is that
Abdelrazak> the performance will soon be a bit better in 1.5 with my
Abdelrazak> forthcoming painting performance patch. But the problem I
Abdelrazak> think Georg is right in that the problem lies in how lines
Abdelrazak> and symbols are painted on screen with mathed.

It would be interesting to know whether the situation improves when
the TeX fonts are unavailable. This is the only difference I can think
of between math and non-maths. It may be that these fonts are
expensive to handle.


As my painting investigation continue, it seems that this problem has 
_nothing_ to do with painting on screen at all. Modifying a text line 
between two huge formula exhibits the slow behaviour even if only the 
text line is repainted on screen (you can use "-dbg painting" to make 
sure of that.


I guess this could be related to the data memory models used in mathed. 
Maybe some big tables created/deleted on the fly?


Also, this comment from Michael Wojcik* makes me wonder if maybe mathed 
does something special with lyxerr... any clue someone?


"So, for example, if LyX were running
with debug enabled, the debug lines being written to the LyX console
window might cause a noticeable jump in csrss load.  But I haven't
tested that."

Abdel.

* http://www.mail-archive.com/lyx-users%40lists.lyx.org/msg51385.html



Re: Can LyX handle large files ?

2006-11-07 Thread Abdelrazak Younes

Georg Baum wrote:

Abdelrazak Younes wrote:


Jean-Marc Lasgouttes wrote:

It would be interesting to know whether the situation improves when
the TeX fonts are unavailable. This is the only difference I can think
of between math and non-maths. It may be that these fonts are
expensive to handle.


That could be easily checked by letting symbolFamily() in GuiFontLoader.C
return an empty string. That disables all symbol fonts.


I've checked that. Without the symbolFamily(), all Greek symbols are 
replaced with their ascii names in red.


Unfortunately that doesn't solve the problem. I still have csrss.exe 
eating 50% of the CPU... :-(


Abdel.



Re: Can LyX handle large files ?

2006-11-07 Thread Georg Baum
Abdelrazak Younes wrote:

> Jean-Marc Lasgouttes wrote:
>> 
>> It would be interesting to know whether the situation improves when
>> the TeX fonts are unavailable. This is the only difference I can think
>> of between math and non-maths. It may be that these fonts are
>> expensive to handle.

That could be easily checked by letting symbolFamily() in GuiFontLoader.C
return an empty string. That disables all symbol fonts.

> You mean the Bakoma fonts, don't you?

The Bakoma fonts are one package of the TeX fonts in truetype format. Others
do exist, too.


Georg



Re: Can LyX handle large files ?

2006-11-07 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:


Abdelrazak> I've tested again this document and the good news is that
Abdelrazak> the performance will soon be a bit better in 1.5 with my
Abdelrazak> forthcoming painting performance patch. But the problem I
Abdelrazak> think Georg is right in that the problem lies in how lines
Abdelrazak> and symbols are painted on screen with mathed.

It would be interesting to know whether the situation improves when
the TeX fonts are unavailable. This is the only difference I can think
of between math and non-maths. It may be that these fonts are
expensive to handle.


You mean the Bakoma fonts, don't you?

Abdel.



Re: Can LyX handle large files ?

2006-11-07 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> I've tested again this document and the good news is that
Abdelrazak> the performance will soon be a bit better in 1.5 with my
Abdelrazak> forthcoming painting performance patch. But the problem I
Abdelrazak> think Georg is right in that the problem lies in how lines
Abdelrazak> and symbols are painted on screen with mathed.

It would be interesting to know whether the situation improves when
the TeX fonts are unavailable. This is the only difference I can think
of between math and non-maths. It may be that these fonts are
expensive to handle.

JMarc


Re: Can LyX handle large files ?

2006-11-07 Thread Georg Baum
[EMAIL PROTECTED] wrote:

> I would be happy to help  with finding the bug, thats why I send a copy
> of this to the  devel-list.
> 
> Splitting the document into parts would only be a crutch, since I often
> need to manage references
> to earlier theorems, to equation numbers, etc..

That works well as long as you open the child documents from the master
document. Then references etc are known across all parts.

> I could imagine a feature like "folding away" a section, so the heading
> would be shown but the
> section is only opened when you double-click on the section heading.

That would be nice to have anyway.

> Another possibility, I could imagine, is making the generated pngs
> resident, so they need not be
> generated again when I start lyx with the same document next time. One
> problem, however,  is
> that I am working on the same document at work during the day, and at
> home in the evening.

I don't think that the previews are the problem. Surely it takes some time
ot process them, but this is done iun the background, and although LyX is a
bit slower until they are generated it is still usable (at least on linux).

> (By the way, the reported behaviour is the same on both computers. It
> could not only be faulted
> to csrssexe, since during the 3.5 min. of "LyX not responding" the
> process manager only credits
> 25% to csrss.exe and 75% to lyx.exe )

No, csrss.exe does not seem to be the problem, it only seems to be a
symptom. See http://bugzilla.lyx.org/show_bug.cgi?id=2900 for more
information.

There was also a thread some time ago with a good explanation:
http://www.mail-archive.com/lyx-users%40lists.lyx.org/msg51385.html

What we know so far is that the slowness is related to math. It is improved
by Instant Preview sometimes, but not completely solved. The reason is
probably that the way how math insets are drawn on screen (and/or the
metrics are calculated) is done in a way that is very expensive on windows.

> I am indeed considering reinstalling some old version of LyX, although
> this is like withdrawing my
> chips from LyX ...

That would be a pity, but I guess we can find the bug with the help of
somebody who is able to do some profiling on windows. Unfortunately we did
not really get started on that, since profilers on windows either seem to
be expensive (glowcode), or complicated to use (kernrate).


Georg



Re: Can LyX handle large files ?

2006-11-07 Thread christian . ridderstrom
On Tue, 7 Nov 2006, [EMAIL PROTECTED] wrote:

> Splitting the document into parts would only be a crutch, since I often 
> need to manage references to earlier theorems, to equation numbers, 
> etc..

Umm... as far as I know and remember from writing my thesis, this works 
just fine for a multi-part document. In order to access references to 
another sub-document you just need to have compiled the entire document 
once. Then LyX remembers what references etc the other sub-documents have.

/Christian

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: Can LyX handle large files ?

2006-11-07 Thread gumm

[EMAIL PROTECTED] schrieb:

On Tue, 7 Nov 2006, [EMAIL PROTECTED] wrote:

  
So any help is appreciated. But the advice to turn instant preview off 
is equivalent to saying "quit LyX".



Then you can try:
* Use an older version of LyX (1.3.7 ?)
* Split your document into several parts

hope any of this helps.
/Christian

PS. It'd be even better if you could help us discover *why* it's so slow 
so that it can be fixed, but unfortunately I don't have any ideas on this. 
If you are interested in helping, you could however contact the 
developers' list and ask if there's any kind of debugging information you 
can give them.

lyx-devel  lists.lyx.org
  


I would be happy to help  with finding the bug, thats why I send a copy 
of this to the  devel-list.


Splitting the document into parts would only be a crutch, since I often 
need to manage references

to earlier theorems, to equation numbers, etc..

I could imagine a feature like "folding away" a section, so the heading 
would be shown but the

section is only opened when you double-click on the section heading.

Another possibility, I could imagine, is making the generated pngs 
resident, so they need not be
generated again when I start lyx with the same document next time. One 
problem, however,  is
that I am working on the same document at work during the day, and at 
home in the evening.


(By the way, the reported behaviour is the same on both computers. It 
could not only be faulted
to csrssexe, since during the 3.5 min. of "LyX not responding" the 
process manager only credits

25% to csrss.exe and 75% to lyx.exe )

I am indeed considering reinstalling some old version of LyX, although 
this is like withdrawing my

chips from LyX ...

 H.Peter




Re: Can LyX handle large files ?

2006-11-07 Thread christian . ridderstrom
On Tue, 7 Nov 2006, [EMAIL PROTECTED] wrote:

> So any help is appreciated. But the advice to turn instant preview off 
> is equivalent to saying "quit LyX".

Then you can try:
* Use an older version of LyX (1.3.7 ?)
* Split your document into several parts

hope any of this helps.
/Christian

PS. It'd be even better if you could help us discover *why* it's so slow 
so that it can be fixed, but unfortunately I don't have any ideas on this. 
If you are interested in helping, you could however contact the 
developers' list and ask if there's any kind of debugging information you 
can give them.
lyx-devel  lists.lyx.org

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: Can LyX handle large files ?

2006-11-07 Thread gumm



So to avoid the problems, turn off Instant preview.

Sorry to say, but the instant preview facility is the reason I came to LyX
and have been sticking with LyX happily since its been available for 
Windows..
I am quite fluent in LaTeX and without the possibility of instant 
previewing I

would have equally happily stayed with WinEdt.

The main reason for using instant preview is that I am using the xy-pic 
package.

I have written a manual of how to use it from within LyX , see
http://www.mathematik.uni-marburg.de/%7Egumm/LyX/xypic/xypic.pdf
From the screenshots,  you can also see that the LyX Math editor alone 
is not

of much use when using xy-pic.

So any help is appreciated. But the advice to turn instant preview off is
equivalent to saying "quit LyX".

H.Peter Gumm



Re: Can LyX handle large files ?

2006-11-07 Thread Georg Baum
Uwe Stöhr wrote:

> So to avoid the problems, turn off Instant preview.

IIRC it is not that easy. The csrss.exe problem has been reported before,
and it seems to appear only for some users.


Georg



Re: Can LyX handle large files ?

2006-11-06 Thread Uwe Stöhr

[EMAIL PROTECTED] schrieb:


i am writing a math document in LyX and as the document gets longer, it
takes lyx longer and longer to get started.

Today I measured the time - it takes 3 min and 35 seconds before Lyx
allows me to start the first editing steps. Until that essentially
everything freezes. The Task-manager shows that lyx.exe and csrss.exe are
taking up 99-100% of CPU-time. Lyx takes between 70 and 80% and csrss
takes the rest.
(I am running XP on a 2.4 GHz with 1024 MB)

I am using Lyx 1.4.3-4. and have instant preview activated.


I also use the latest Lyx under Windows and tested this with my large 
math manual:

http://wiki.lyx.org/LyX/LyXMathebefehle

I can open the file with lots of math in 2 seconds. Editing is 
immediately possible.


The problem is Instant preview: When I have this enabled it takes 1min30 
until I can edit the document. It seems that dvipng, that is used to 
convert the DVI-snipptes of the formulas to PNG, that are then displayed 
(or reconverted to a format that LyX can display?) in LyX, needs some 
time to do this.
But once I can edit the document, I can scroll down and the previews are 
created very fast.


For my document there are 14 PNG-images and a DVI with 541 snippets in 
the temp folder. Of course it needs some time to generate them so I'm 
not surprized about the long loading time.


So to avoid the problems, turn off Instant preview.

regards Uwe


Re: Can LyX handle large files ?

2006-11-06 Thread christian . ridderstrom
On Mon, 6 Nov 2006, Bruce Pourciau wrote:

> >* You can set LyX to not show pictures within the LyX window
> 
> Is there a way to make all the graphics in a document not appear, without
> turning them off one-by-one?

This was possible in 1.3.3 at least. Check the preferences or settings or 
whatever it is called these days.

/C

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: Can LyX handle large files ?

2006-11-06 Thread Bruce Pourciau

* You can set LyX to not show pictures within the LyX window


Is there a way to make all the graphics in a document not appear,  
without turning them off one-by-one?


Bruce

On Nov 6, 2006, at 3:16 PM, [EMAIL PROTECTED] wrote:


On Mon, 6 Nov 2006, David A. Case wrote:


On Mon, Nov 06, 2006, [EMAIL PROTECTED] wrote:


i am writing a math document in LyX and as the document gets  
longer, it

takes lyx longer and longer to get started.



(I am running XP on a 2.4 GHz with 1024 MB)


It is certainly possible (and expected) to see much faster behavior.
On similar hardware, I can open a 400 page book, with about 800
equations, in about 10 seconds.  I can't tell why your system is  
slow,

but try closing all figure floats, and (possibly) turning off instant
preview.  Others may have a better idea of what things cause slow
performance, but it does not seem to be inherent in LyX (or with
windows).


It is quite possible to do large documents in LyX. My thesis was the
equivalent of about 160 pages. Using LyX 1.3.3 I could work on it
suprisingly well using just a laptop with a 300 MHz Pentium III  
running

Linux. A few tips though:

* You can split up your thesis into a multi-part document, this makes
  each part much easier to work with.
* You can set LyX to not show pictures within the LyX window

I was using LyX 1.3.3 when I wrote my thesis, and unfortunately the  
latest
version seems to be quite a bit slower. This is a known problem.  
Maybe you

could try LyX 1.3.7 instead?

/Christian

--
Christian Ridderström, +46-8-768 39 44   http:// 
www.md.kth.se/~chr




Re: Can LyX handle large files ?

2006-11-06 Thread Jean-Marc Lasgouttes
> "gumm" == gumm  <[EMAIL PROTECTED]> writes:

gumm> Today I measured the time - it takes 3 min and 35 seconds before
gumm> Lyx allows me to start the first editing steps. Until that
gumm> essentially everything freezes. The Task-manager shows that
gumm> lyx.exe and csrss.exe are taking up 99-100% of CPU-time. Lyx
gumm> takes between 70 and 80% and csrss takes the rest. (I am running
gumm> XP on a 2.4 GHz with 1024 MB)

Do you have a lot of maths? There is a known bug about lyx/win and
maths, but we do not know what to do about it.

JMarc



Re: Can LyX handle large files ?

2006-11-06 Thread christian . ridderstrom
On Mon, 6 Nov 2006, David A. Case wrote:

> On Mon, Nov 06, 2006, [EMAIL PROTECTED] wrote:
> > 
> > i am writing a math document in LyX and as the document gets longer, it
> > takes lyx longer and longer to get started.
> 
> > (I am running XP on a 2.4 GHz with 1024 MB)
> 
> It is certainly possible (and expected) to see much faster behavior.  
> On similar hardware, I can open a 400 page book, with about 800 
> equations, in about 10 seconds.  I can't tell why your system is slow, 
> but try closing all figure floats, and (possibly) turning off instant 
> preview.  Others may have a better idea of what things cause slow 
> performance, but it does not seem to be inherent in LyX (or with 
> windows).

It is quite possible to do large documents in LyX. My thesis was the 
equivalent of about 160 pages. Using LyX 1.3.3 I could work on it 
suprisingly well using just a laptop with a 300 MHz Pentium III running 
Linux. A few tips though:

* You can split up your thesis into a multi-part document, this makes
  each part much easier to work with.
* You can set LyX to not show pictures within the LyX window

I was using LyX 1.3.3 when I wrote my thesis, and unfortunately the latest 
version seems to be quite a bit slower. This is a known problem. Maybe you 
could try LyX 1.3.7 instead?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: Can LyX handle large files ?

2006-11-06 Thread David A. Case
On Mon, Nov 06, 2006, [EMAIL PROTECTED] wrote:
> 
> i am writing a math document in LyX and as the document gets longer, it
> takes lyx longer and longer to get started.

> (I am running XP on a 2.4 GHz with 1024 MB)

It is certainly possible (and expected) to see much faster behavior.  On
similar hardware, I can open a 400 page book, with about 800 equations, in
about 10 seconds.  I can't tell why your system is slow, but try closing all
figure floats, and (possibly) turning off instant preview.  Others may have a
better idea of what things cause slow performance, but it does not seem to
be inherent in LyX (or with windows).

dave case



Can LyX handle large files ?

2006-11-06 Thread gumm
Hi,

i am writing a math document in LyX and as the document gets longer, it
takes lyx longer and longer to get started.

Today I measured the time - it takes 3 min and 35 seconds before Lyx
allows me to start the first editing steps. Until that essentially
everything freezes. The Task-manager shows that lyx.exe and csrss.exe are
taking up 99-100% of CPU-time. Lyx takes between 70 and 80% and csrss
takes the rest.
(I am running XP on a 2.4 GHz with 1024 MB)

I am using Lyx 1.4.3-4. and have instant preview activated. Even after
that long starting perid, I have to wait several seconds for each
screenfull that I am trying to scroll, apparently since instant preview is
always preparing the png-files. So I am asking myself - if after 3:35 min
these png-files have not been prepared, what has Lyx been doing all the
time ?

But my question is more serious than that - will Lyx be able to deal with
my document as it gets larger than the 63 pages of pdf that I have now. I
assume that I will run up to about 100 pages in the end. Will that turn
out to be too much for Lyx ?

Best regards,
  H.Peter Gumm