-
Geoff Simmons authored
VSLQ_Dispatch() is a powerful tool for the C API, but the restrictions and overhead involved with the C/Go bridge make it too unwieldy to use. Too much synchronization becomes necessary for a low-level API like this. The cgocall overhead becomes excessive. It seems to be difficult, perhaps impossible, to implement callbacks without creating many objects on the Go heap. Since many objects from the log are created in hot code, this puts excessive pressure on the Go garbage collector. This version uses low-level log read operations, excusively VSL_Next() and related functions. The C/Go bridge is much smaller and simpler. It should be possible to create the objects for log data on the Go stack. The Cursor and Query interfaces reflect the underlying VSL interface more faithfully. Distinct Cursors are safe for concurrent reads (as for struct VSL_cursor from the VSL interface). This means that grouping and VSL queries will have to re-implemented in Go.
7147cd55