I do not have time for this at the moment, but creating this as a note for the future or for others who may want to help do this work.
GGIRread::readAxivity currently seems to be the slowest of the data reading functions used by GGIR.
One possible quick speed gain would be to replace as.POSIXct by fasttime::fastPOSIXct. I just tested and it provides a 12% speed increase for reading the first 24 hours of the data. It seems, however, that more time goes into reading data chunks further down in the data.
However, it may be worthwhile refactoring the entire function. Reference points for that may be:
Current version of the readAxivity, because this was thoroughly debugged and verified in 2020.
I do not have time for this at the moment, but creating this as a note for the future or for others who may want to help do this work.
GGIRread::readAxivity currently seems to be the slowest of the data reading functions used by GGIR.
One possible quick speed gain would be to replace as.POSIXct by fasttime::fastPOSIXct. I just tested and it provides a 12% speed increase for reading the first 24 hours of the data. It seems, however, that more time goes into reading data chunks further down in the data.
However, it may be worthwhile refactoring the entire function. Reference points for that may be:
https://github.com/OxWearables/actipy=> no longer possible as that would be a violation of their license