Comments (9)
I don't think you gonna gain much on serializer. I already try when I optimize a bit the code. I did it for deserializer but on serializer, I almost only use the entrySet() method and compared to the gwt implementation, it's almost the same if I remember. GWT already have a special implementation when the key is a String.
But I can give an other try and see how it goes.
from gwt-jackson.
GWT already have a special implementation when the key is a String.
I really didn't know about that! I do want to see this implementation! Do you have the resource for this? Thanks for the info!!
from gwt-jackson.
I found this resource, but it is a proposal..
http://code.google.com/p/google-web-toolkit/wiki/HashMapOptimization
from gwt-jackson.
But I can give an other try and see how it goes.
It's on my roadmap create a benchmark comparing my JsCollections API with default GWT JRE implementations. I would be glad if you could try this simple switch and give me some feedback.
In JsMap implementation, I cache the keys in order to avoid iterating over them when calling keyset() for example. (Notice that native Object.keys() has a linear cost)
LightMap is based on JsMap, so I believe it would cause some performance gain.
from gwt-jackson.
It's directly inside the GWT emulation :
https://gwt.googlesource.com/gwt/+/master/user/super/com/google/gwt/emul/java/util/AbstractHashMap.java
from gwt-jackson.
I tried it but I didn't see a performance gain. I only tested on chromium though.
I tried with different data size and the average time is the same.
In my test case, I only use the put and entrySet method on map.
One side note, your collection classes use the diamond operator and are only java 7+ compatible. I had to change that to use them in my code.
from gwt-jackson.
Hum... thanks for the feedback! I would like to compare memory usage too, but this I will do later. Anyway, I guess I won't spend more energy with collections. My original intention was to provide java.util implementations supporting native arrays and this goal has been achieved.
from gwt-jackson.
It does not mean you have to give up on them :) I only used a small subset
and in a specific use case. It needs more test if you really want to know
how it compares.
What do you mean by supporting native arrays ?
Le 4 juin 2014 23:05, "Danilo Reinert" [email protected] a Γ©crit :
Hum... thanks for the feedback! I would like to compare memory usage too,
but this I will do later. Anyway, I guess I won't spend more energy with
collections. My original intention was to provide java.util implementations
supporting native arrays and this goal has been achieved.β
Reply to this email directly or view it on GitHub
#19 (comment).
from gwt-jackson.
What do you mean by supporting native arrays ?
JsArrayList accepts a JsArray in its constructor. JsArraySet too. Also I implemented an Iterator for jsArrays (JsArrayIterator).
I did not give up from my collections api :)
I have many other priorities to work on, so I'll just not improve this for now.
My next efforts are to develop a simple Promises API in -Core. Then I'll refactor the -HTTP to use it. Later I need to implement autobinding in -Databind using Generators.
from gwt-jackson.
Related Issues (20)
- No source code is available for type com.fasterxml.jackson.databind.ObjectMapper; did you forget to inherit a required module? HOT 3
- Support for java.util.Optional HOT 1
- Expected a string but was BEGIN_OBJECT at line 1 column 2 HOT 1
- Please REVERT the dependency on Jackson 2.9.*, Jackson 2.9.* is NOT compatible with GWT. HOT 2
- Support for @JsonCreator(mode = Mode.DELEGATING)
- Custom deserializer compilation error
- Getter returning Optional<T> of nullable T causing compilation error HOT 2
- GWT 2.6.1 + GwtJackson 0.15.3 HOT 3
- JsonSerializationContext.Builder override not working as expected
- Error:GWT Compiler: No source code is available for type com.fasterxml.jackson.annotation.JsonTypeInfo.As; did you forget to inherit a required module?
- JsonTypeInfo defaultImpl attribute not working HOT 1
- Update jackson dependency to 2.9.8
- Update javapoet dependency to 1.11.1
- Support for JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE
- Annotations on Java8 default interface are ignored HOT 1
- Can't figure out the stackoverflow I am getting
- More (de)serialization customization (JsonFilter or equivalent)
- Double.NaN / NEGATIVE_INFINITY / POSITIVE_INFINITY - Numeric values must be finite, but was
- Many compile problems
- I want to deserialize a property with any type of value.
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 gwt-jackson.