Comments (4)
From martin.grotzke on January 06, 2010 14:32:50
The heavy org.joda.time.chrono.ISOChronology is shared by several DateTime instances,
therefore the tons of xml for that would be serialized only once due to reference
handling.
As an alternative, I implemented a simple format/parse based serialization.
A short comparison shows both ways side by side: serialized a session with n DateTime
instances 1000 times, e.g. serializing a session with a single DateTime instance took
~900 msec using default (reflection based) serialization, and 260 msec using the
string format based serialization.
0x: 100 msec, 332 bytes
1x: 900 (260) msec, 10801 (480) bytes
2x: 900 (320) msec, 10997 (616) bytes
5x: 900 (520) msec, 11585 (1026) bytes
10x: 960 (640) msec, 12566 (1716) bytes
100x: 1391 (1200) msec, 30417 (14328) bytes
from memcached-session-manager.
From martin.grotzke on February 08, 2010 18:04:01
After tests are written I changed the implementation: now millis are stored, and
chronology and timezone if they are not default (default chronology is ISOChronology,
default timezone is chosen from DateTimeZone.getDefault()).
These chronologies are supported:
* ISOChronology
* CopticChronology
* EthiopicChronology
* GregorianChronology
* JulianChronology
* IslamicChronology
* BuddhistChronology
* GJChronology
After these changes I ran the performance comparison again, with just DateTime
instances created with "new DateTime()" - this choses ISOChronology and the default
timezone. New numbers:
0xjoda : 100 msec, 332 bytes
1xjoda : 900 (180) msec, 10801 (467) bytes
2xjoda : 900 (200) msec, 10997 (590) bytes
5xjoda : 900 (340) msec, 11585 (961) bytes
10xjoda : 960 (520) msec, 12566 (1586) bytes
100xjoda : 1391 (860) msec, 30417 (13028) bytes
from memcached-session-manager.
From martin.grotzke on February 08, 2010 18:12:12
Created new subproject javolution-serializer-jodatime, this provides the msm-
javolution-serializer-jodatime jar which must be placed in WEB-INF/lib, the Manager
element in server.xml/context.xml has to be configured with
customConverter="de.javakaffee.web.msm.serializer.javolution.JodaDateTimeFormat"
Status: Fixed
Labels: FixedIn1.2
from memcached-session-manager.
From martin.grotzke on March 20, 2010 14:58:48
(No comment was entered for this change.)
Labels: Milestone-1.2
from memcached-session-manager.
Related Issues (20)
- Can I use multiple MemcachedConnection? HOT 1
- Cache node failover not working in AutoDiscovery mode (ElastiCache)
- Configuring memcached with Redis Cluster
- Connecting to "Secure" Redis HOT 1
- Does AutoDiscovery mode (Elasticache) as non-sticky save the sessions in multiple nodes?
- java.lang.NoSuchFieldException: parentOffset HOT 1
- expose threadpool metrics from BackupSessionService and LockingStrategy
- Support for session object serialization filters HOT 2
- Principal and other attributes need some flexibility with Serialization
- SSL support for redis HOT 1
- Dependency com.thoughtworks.xstream:xstream, leading to CVE problem HOT 1
- Support AuthType JASPIC
- DefaultTreeMode Serialization Problem
- Validity data and session data have mismatching TTL
- Custom principal from web application cannot be deserialized
- Tomcat error: com.couchbase.client.vbucket.provider.BucketConfigurationProvider: Could not parse config, retrying bootstrap HOT 3
- create link to successor project: redex-sm HOT 1
- Please consider support for tomcat 10.1 HOT 3
- Memcached Session Manager failing in multi-threaded environment
- Tomcat session does not persist for multiple tomcat pods with the Memcached session manager HOT 2
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 memcached-session-manager.