We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
Recur.getDates() has become very slow since #488, when the seed date has a timezone set.
To Reproduce
I've added a new test-case to RecurTest to demonstrate the problem in PR #507
RecurTest
private static TimeZoneRegistry tzReg = TimeZoneRegistryFactory.getInstance().createRegistry(); public RecurTest(Recur recur, Date seed, Date periodStart, Date periodEnd, Value value, int expectedCount, long maxTime) { this("testGetDatesMaxTime", recur, seed, periodStart, periodEnd, value); this.expectedCount = expectedCount; this.maxTime = maxTime; } public void testGetDatesMaxTime() { DateTime start = new DateTime(seed); start.setTimeZone(tzReg.getTimeZone("Europe/London")); Period period = new Period(new DateTime(periodStart), new DateTime(periodEnd)); long t0 = System.currentTimeMillis(); DateList dates = recur.getDates(start, period, value); long dt = System.currentTimeMillis() - t0; String message = String.format("maxTime exceeded %dms", maxTime); assertEquals(message, maxTime, Math.max(dt, maxTime)); assertEquals(expectedCount, dates.size()); } // check maxTime recur = new Recur("FREQ=WEEKLY;WKST=MO;UNTIL=20160901T230000;INTERVAL=1;BYDAY=TH"); suite.addTest(new RecurTest(recur, new DateTime("20160414T100000"), new DateTime("20110713T213021"), new DateTime("20230713T213021"), Value.DATE_TIME, 21, 100));
Expected behavior
Recur.getDates() should complete in < 100ms.
Before #488 it typically took < 10ms
Screenshots
After #488 it now takes > 900ms! junit.framework.AssertionFailedError: maxTime exceeded 100ms expected:<100> but was:<909>
Environment (please complete the following information):
Additional context
This test fails to demonstrate the problem. PR #508 fixes this issue and when applied the test succeeds,
The text was updated successfully, but these errors were encountered:
make initialOnsetUTC an instance variable to fix perf issue ical4j#506
23595e9
make initialOnsetUTC an instance variable to fix perf issue #506
f64cb31
benfortuna
No branches or pull requests
Describe the bug
Recur.getDates() has become very slow since #488, when the seed date has a timezone set.
To Reproduce
I've added a new test-case to
RecurTest
to demonstrate the problem in PR #507Expected behavior
Recur.getDates() should complete in < 100ms.
Before #488 it typically took < 10ms
Screenshots
After #488 it now takes > 900ms!
junit.framework.AssertionFailedError: maxTime exceeded 100ms expected:<100> but was:<909>
Environment (please complete the following information):
Additional context
This test fails to demonstrate the problem.
PR #508 fixes this issue and when applied the test succeeds,
The text was updated successfully, but these errors were encountered: