Skip to content

Add Text interface to WebKitGtk #42

hamishmack opened this Issue Sep 24, 2012 · 1 comment

1 participant

ghcjs member

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.

ghcjs member

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.