Uwe Stöhr wrote:
 > When I use LYX to create Persian texts, it's going so slow when you
> scroll the document, even you type only 3 or 4 pages. But I don't occur this
 > problem when writing in English. I attached a sample file to this mail.

What version of LyX are you using? Scrolling is indeed slower as for English. The strange thing is that when I highlight all text of your document and mar it as English too, I can scroll as fast as for English text, although I still have the Farsi characters and the document language is still Farsi.
So this is definitively a bug in our RTL (bidi) support.
Could you please report this bug at bugzilla.lyx.org?

thanks and regards
Uwe

Can you try the attached "patch" to see if it speeds things up? Note that this is not really a patch --- the painting will be *incorrect* with it applied; but it's just to diagnose whether the problem is where I think it is.

If it is, then we have to think about how to solve it --- I don't really have any good suggestions... :( . But let's worry about that once we confirm that that's really the problem...

Dov
diff -r 19a9abc0bcf0 src/rowpainter.cpp
--- a/src/rowpainter.cpp	Sat Aug 09 17:01:20 2008 +0000
+++ b/src/rowpainter.cpp	Sun Aug 10 23:16:20 2008 +0300
@@ -274,8 +274,8 @@
 		 * Arabic characters, but rather paint them one at a time.
 		 * See also http://thread.gmane.org/gmane.editors.lyx.devel/79740
 		 */
-		if (hebrew)
-			break;
+//		if (hebrew)
+//			break;
 
 		/* FIXME: these checks are irrelevant, since 'arabic' and
 		 * 'hebrew' alone are already going to trigger a break.
@@ -298,7 +298,7 @@
 				c = '(';
 			c = par_.transformChar(c, pos);
 			/* see comment in hebrew, explaining why we break */
-			break;
+			//break;
 		}
 
 		str.push_back(c);

Reply via email to