Hello,
I hope some of the LibraryLink experts will be able to comment on this.
Could there be any negative effects from loading "too many" LibraryFunctions? My package has 156 at the moments and the number is steadily increasing. Package loading is already unusually slow because of this: 2 seconds on OS X and 40 seconds or so on a Raspberry Pi. Of these functions, 21 use LinkObject passing, which means that there is a loopback link created for each of them (as shown by Links[]
).
Now I didn't observe any negative effects, but I am not sure if anyone has pushed LibraryLink so far before.
So, in principle, can there be any negative effects from loading lots of LibraryFunctions, or from creating too many loopback links? Could it affect general performance? Should I take steps now to reduce the number of functions in the package? Or is the system designed to cope with arbitrarily many loaded functions?
Just to be clear, I have not observed any problems so far apart from the mildly annoying loading performance. But it would give me some peace of mind to know that such use cases were anticipated for LibraryLink.