Skip to content
This repository

Add Text interface to WebKitGtk #42

Open
hamishmack opened this Issue September 24, 2012 · 1 comment

1 participant

Hamish Mackenzie
Hamish Mackenzie
Owner

Currently the bindings expect Haskell String and to satisfy the C interface it is converted to/from a UTF-8 CString (a ByteArray). Overhead of this conversion is high and using Text would just add another conversion (Text -> String -> CString UTF-8).

Solution is to find a good way to generate WebKitGtk bindings that take Text and work convert to CString UTF-8 in native code, but replace them at link time with alternative implementations that convert use the fast JavaScript functions we have for converting Text to/from JS strings.

Then we can encourage people concerned with performance to use Text.

Hamish Mackenzie
Owner

JSC https://github.com/ghcjs/jsc uses a MakeStringRef type class and I think this approach might work well for the rest of WebKitGTK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.