Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Performance of fit.jar library from Fit SDK

Rank

Total Posts: 9

Joined 0

PM

Hi developers and Ant team wink

I am working on Android project for tracking activities (bike rides) and i am using fit.jar from Fit SDK.
In my use case I am trying to write fit file with around 8000 Records Messages (aprox. 20min ride) at the end of ride and I noticed that library needs like 20++ sec to write this fit file.

Resulting file is around 150kb and accepted by Strava so it is valid (written correctly) but I wonder if I did something wrong when library needs so long time to write 150kb file on modern Android phone.

I basically collect everything that needs to be written into the list of Mesg object and than I am trying to do the following:

encode.write(mFitMesgs);
encode.close(); 


this encode.write(..) is my only call to write method cause i didn't want to access storage too often but just to write everything prepared in one hit.

I implemented simple file observer as well and noticed one more strange behaviour. File is during this call open and close several times and everything last pretty long as mentioned before.      
RankRankRankRank

Total Posts: 122

Joined 2010-10-25

PM

I will confirm that that Java .FIT implementation is not very efficient. I at one point (about 3or4 years ago) experimented with using .FIT for my internal storage in IpBike. I was not too worried about the writing performance to much but loading things back up is equally bad. In my on an old xperia active loading back up a small ride was about 30 times slower than my own custom format. the file size was smaller but not that much and the load time was never going to be acceptable for me.

I did not profile the code but I did take a look at some of it and I was not surprised it was slow with some of the constructs being used.      
Rank

Total Posts: 9

Joined 0

PM

thanks ifor.. wink

anybody else? support team?      
Rank

Total Posts: 20

Joined 2015-05-11

PM

Hi Ewoks,

We have made changes to increase encode performance which will be included in the next public release. We will continue to look into improving the performance of the Java SDK.      
Rank

Total Posts: 9

Joined 0

PM

Thanks for reply. When we can expect next public release? Is it possible to access beta versions? 10q