Skip to content

Optimize performance of area draw methods #75

@AndyObtiva

Description

@AndyObtiva

Hi,

I am opening an issue here that is related to the following issues in other projects:

The work that needs to be done was mentioned in these comments on the libui-ng issue:

@kojix2 : kou measured the time required to call a C function from Ruby with FFI and native C extension and concluded that FFI consumes about 10 to 100 times longer.

@cody271 : I would suggest a native C extension just for the uiDraw calls, the rest of the bindings for controls can stay FFI.

As you already saw on Twitter, I announced that a 2-hour workshop that I proposed for RubyConf 2023 was accepted for November 13, 2023 (Workshop Title: How To Build Desktop Applications in Ruby): https://rubyconf-2023.sessionize.com/session/531448

Just like how I announced a new release of glimmer-dsl-libui in RubyConf 2022 that you helped contribute to in a new release of LibUI, it would be great if I could announce in RubyConf 2023 a new release of glimmer-dsl-libui that includes optimized area drawing via an optimized LibUI Ruby binding with a C extension for the uiDraw calls only (LibUI.draw_* methods like draw_path_arc_to, draw_path_line_to, and draw_path_add_rectangle).

If that is not possible by November 13, 2023, then if you could make a new release by then to resolve other simpler issues or expose new behavior from libui-ng, that would be great too (unless you have already exposed all the latest features in libui-ng).

Otherwise, it would still be useful to have this optimization implemented eventually as it would be great for a variety of graphical applications like games, live diagramming applications with thousands of nodes, and analytical applications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions