Comments (3)
Interesting!
a) I've never conducted any performance tests but it'd be interesting to compare loading via the resource system vs. the classloader, especially since the commit you linked is directly related to that.
b) I wonder if this would mean the library wouldn't have to include the tzdata by having a custom TzdbZoneRulesProvider
that calls setUseCaches(false)
.
The performance hit might be reason enough not to use it, if it means that you're adding a couple hundred milliseconds during initialization.
from threetenabp.
I did a few benchmarks the weekend before last and got around 1-2ms of loading time. I did not bother comparing with the jar resources version due to Dan's blog post and approach on the Joda variant.
As to performance in general, I think I might be more interested in compiling our own TZDB format which allows us to lazy-load individual pieces from it as they're used. I haven't looked into much, just wanted to get this library up and start experimenting.
from threetenabp.
I did some comparison a few days ago, of the most simple way for Joda vs ThreeTen vs ThreeTenABP :
Each is a different app, of course. Tested on Pixel 2 with Android P, so currently there isn't any newer version of Android, and it's quite a good device too...
What I did is to init the library (if needed) , and get the current time, twice. I measured the time of each of those things.
I don't know about memory usage, but it seems that Joda and ThreeTenABP have better speed of first usage than the normal ThreeTen library.
When using the Android framework, though, it takes ~33ms for first call (of "LocalDateTime.now()") to finish. So if your app has minSdk of at least 26, you should consider using the Android framework instead. But even then, I think it has a disadvantage as time zones aren't updated, right? So I guess there is still need of using a library (made request here) ... :(
Can anyone else verify the results ?
Attached here sample projects for each of those.
from threetenabp.
Related Issues (20)
- Add Usage info HOT 1
- DateTimeParseException when parse HOT 4
- Update tzdb.dat to new version. HOT 3
- Duplicate ThreeTen Classes in AndroidTest HOT 2
- Calculation problem HOT 4
- IllegalStateException: Already initialized HOT 14
- minusDays() returns wrong date for specific use case HOT 2
- R8 issue with Ser HOT 14
- Contribution: Gson.toJson with @Expose annotations error HOT 1
- Will we still need this library after java.time will be desugared? HOT 6
- Do I actually want to switch to desugared native apis? HOT 7
- Wrong Format OffsetDateTime HOT 1
- Bug in DateTimeFormatter - Wrong year. HOT 1
- Help for specific pattern HOT 1
- Support Compose Preview HOT 2
- Wrong time zone offset HOT 1
- NoClassDefFoundError in android 4.4 even with multidex enabled HOT 2
- Returns the Value to 1926 HOT 3
- Please *do not* consider switching to core library desugaring HOT 2
- Fatal Exception: n30.g Unknown time-zone ID: America/Ciudad_Juarez HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from threetenabp.