@chofrock thanks for checking, yeah, so it's just taking too long, maybe because it goes through that POSIX layer of file operations and that just takes its time. The python library is most probably using the same mechanism thus the same result.
It would be interesting to see a comment from someone in Galileo team, if it's at all possible to do something with this (custom kernel driver? just some tuning of the call tree? just wild guesses).