chouzar / chip

Registry library for gleam
15 stars 2 forks source link

Make tag lookup fully concurrent #8

Closed chouzar closed 2 days ago

chouzar commented 2 months ago

For making a lookup in the tagged table we currently need to first retrieve the Table Id, then make the search in ETS:

https://github.com/chouzar/chip/blob/1cbf02bfec648c6d21e83dec3b755124f58834d8/src/chip.gleam#L138-L144

This puts a bit of a slowdown to calls from different callers as they have to wait for the registry to return the reference. Some possible solutions:

chouzar commented 2 days ago

Returning a table is not a big hit, also this should be partially solved by implementing a dispatch function.