Comments (10)
Yes, because this issue is very old I think it may not apply to the current develop branch of ical4j.
But if you do find this is still an issue feel free to raise a new ticket or we can reopen this one.
from ical4j.
from ical4j.
Hi,
It's also worth noting the ZoneInfo line which is related. If you check duplicates you'll find lots of ZoneInfo object duplicates (in our case all Etc/GMT). These may in our case occur due to hydration of objects from either Hibernate or EhCache, and could be deduplicated within DateTime.setTimezone().
@benfortuna what do you think about some work to deduplicate some of these. In our case we have 250k ZoneInfo objects taking up 4% of memory.
from ical4j.
Hi nealeu,
I suspect the ZoneInfo instances are referenced by java.util.Date instances, or possibly also DateFormat instances, so hopefully they should de-dupe if we optimise the dates. In fact I think the whole problem will go away, or at least change, if we implement the new Java date/time API. But if there are some easy fixes to implement beforehand I will also try to do that.
from ical4j.
Hi @benfortuna,
Yes, I believe they are. I may be able to take a more detailed look this Friday, and possibly put in a pull request.
from ical4j.
Hi Ben,
I'm having a look at this now. I suspect what you're saying about the new API is that it's immutable, and therefore doesn't have things like:
public static TimeZone getDefault() {
return (TimeZone) getDefaultRef().clone();
}
from ical4j.
Looking at where TimeZone instances get created, most are where no zone is supplied in calls to things like DateTime, and therefore resetTimeZone() is called, which does a .clone().
An example is at DateTime.setTimeZone(TimeZone)
.
It looks as though we could supply a default singleton into that call, with setID and setRawOffset overridden defensively to prevent modification. I'll give this a go locally.
from ical4j.
older versions now in maintenance mode only
from ical4j.
@benfortuna Thanks for updating. I can see v4 is a significant change from 3. Are you expecting this to have been resolved in that version?
Thanks.
from ical4j.
I dove in and I think I have the answer.
This commit shifts to being able to switch to UTC by default (which fits our usage) and therefore uses a singleton.
c754e47#diff-a393647dc44579901b89524b7fe7a4c680cb4506ed868f8ae23305a3645fdba9
from ical4j.
Related Issues (20)
- Outlook ics "nested too deep" HOT 3
- Times of events are off by one hour HOT 1
- Validation does not spot quite simple contraints
- Cannot parse EMAIL="mailto:[email protected]" HOT 2
- Exchange is unable to actively parse ICS file, but Outlook 365 can parse it normally.
- extractor.ICalendarExtractor: Unable to parse icalendar with slashed
- Errors need to be flagged as such in log HOT 3
- TZ aliases not working HOT 2
- `DateListPropertyRule` not fixing time zone name HOT 1
- `calculateRecurrenceSet` return value is not accurate
- ClassCastException: VAlarm cannot be cast to Observance when VTIMEZONE contains a VALARM
- UTC vs Etc/UTC - CalendarBuilder Exception (java.time.DateTimeException: Unknown timezone identifier [UTC]) HOT 4
- Summer-wintertime-change is not regarded in Component.calculateRecurrenceSet
- Possible recur bug? HOT 1
- Value comparisons for enumerated values should be case insensitive HOT 3
- ComponentValidator has incorrect rules
- IndexOutOfBoundsException in ZoneRulesBuilder.buildTransitionRules when BYDAY is missing in RRULE in VTIMEZONE
- Unnecessary WARN in the log HOT 1
- Memory Leak when using CalendarBuilder HOT 3
- Create a Version 4.0 Release HOT 4
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 ical4j.