[Lazarus] Java's Document & Elements model
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri Jun 27 01:20:01 CEST 2008
On Thu, 26 Jun 2008 23:35:13 +0200
"Graeme Geldenhuys" <graemeg.lists at gmail.com> wrote:
>[...]
> > Also in SynEdit the biggest unit I have ever seen is FPCMacOSAll
> > with 100.000 lines, and even there SynEdit works nicely.
>
> And one of the Qt and Java tests, for reasons beyond me, is to paste
> 1Mb of text in a TextEdit component. No slow down in painting, moving
> the cursor or scrolling the text is experienced. So it scales very
> well.
1Mb = 1 mega byte?
That's not very impressive.
Or do you mean 1Mb = 1 million blocks?
Please try something like fpc/packages/univint/src/MacOSAll.pas.
Jump to the end of the file and see what happens to the highlighting
and your CPU.
> > My point is: Don't optimize unless you have actually tested and
>this
> > is a bottleneck, or else you will probably just make things worse.
>
> Good point. I'll test this by implementing a styled document viewer
> (and possibly editor) for HTML and RTF and see how it goes.
Do you mean you want to write a complete HTML viewer?
> > university in places where it is absolutely not a good choice. Some
> > example. They made a 3D Game library in Java in a laboratory.
> > Surprisingly their biggest problem is that its't so slow it's
> > unusable
>
> I cannot say what is the cause of the slowness in Swing or AWT. But I
> must say, I have seen very impressing 3D demos using Java and they
> where silky smooth. How they did it is beyond me, but I was very
> impressed! Pitty those developers couldn't help speed up the Java GUI
> components.
The trick of many 3D programs is to let the graphic card do the work.
This is language independent and says nothing about the compiler.
Mattias
More information about the Lazarus
mailing list