Recent

Author Topic: Slow editor on Mac  (Read 41999 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Slow editor on Mac
« Reply #60 on: May 17, 2014, 07:10:30 pm »
Hiding the caret, just invalidates the area of the caret. The next paint will deal with it.

BUt the scroll comes before. And it does not honour the invalidate correct.

That must be fixed.

I have no idea how much work that will be. The IFDEF code was a start. But it will be some time before I might have any chance to even think about continuing on it.

All else is just workarounds, no solutions

ddfs

  • New Member
  • *
  • Posts: 10
Re: Slow editor on Mac
« Reply #61 on: May 17, 2014, 07:15:17 pm »
Well, that is pretty sad. It looks like just a few people is interested in lazarus on osx. :(

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Slow editor on Mac
« Reply #62 on: May 17, 2014, 07:28:32 pm »
From what I see, there're 2 completely different issues:
* scrolling issues with not improper invalidation. To debug it - a stand alone project is needed that would show the problem. Debugging it with SynEdit is too complicated.
* performance issues with rendering text. Refer to earlier Hoch post. If font antialiasing is disabled the text is rendered much faster. Thus text output needs to be revised (on widgetset level) to use caching  (?) or something.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Slow editor on Mac
« Reply #63 on: May 17, 2014, 07:49:43 pm »
I thought I always saw scrolling mentioned.

At current I want have the time. But if I have it I may look at a test case for ScrollWindowEx.

The issue is, that if any part of the to-be-scrolled area is invalid, then only the valid part should be scrolled, and the rest should be invalidated.

Unless Carbon can have several invalidated areas. (all other WS do minimum enclosing rectangle)

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Slow editor on Mac
« Reply #64 on: May 17, 2014, 08:38:30 pm »
I thought I always saw scrolling mentioned.
The test cases I made for Hoch had nothing but text rendering.
That's why I consider one of solutions is to speed up the text output... besides Carbon it using the deprecated ATSU API anyway.

So updating to conditional usage of CoreText might allow Carbon widgetset to survive another OSX release :)
Why conditional? CoreText is not available in OSX 10.4

This knowledge my be beneficial to Cocoa (if Cocoa suffers from the same issue).
IIRC, Cocoa is good enough to compile an application with SynEdit.

For scrolling issue - yes, please review ScrollWindowEx test case. The morel lightweight example is, the easier it would be to debug and fix.
Trying to reproduce an issue with SynEdit (with lot of it's settings and compiler conditions) doesn't seem easy enough to spend time on it.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9792
  • Debugger - SynEdit - and more
    • wiki
Re: Slow editor on Mac
« Reply #65 on: May 17, 2014, 09:05:19 pm »
Report it as a bug, assign; writing a testcase to me.

I will do it, but if no miracle happens it will be a couple of weeks before I get there

ps

  • Full Member
  • ***
  • Posts: 136
    • CSS
Re: Slow editor on Mac
« Reply #66 on: January 11, 2019, 10:10:00 am »
In my opinion this is not text rendering problem but scrolling problem. Here is my test app and bug report: https://bugs.freepascal.org/view.php?id=34829. Whole content is full repaint while scrolling in TScrollBox, TDrawGrid , but not in TListBoxe. Only TListBox scrolls smoothly on MacOS.
Small simple CSS/box model implementation: https://github.com/pst2d/csscontrols/tree/dev

 

TinyPortal © 2005-2018