At 8:46 PM +0100 24/3/03, Martin Hasch wrote:
Hello Rick,

On Mon, Mar 24, 2003 at 11:19:45AM +1100, Rick Measham wrote:
 Attached is the first Beta of DateTime::Event::Easter. Play with it. Poke
 it. If something doesn't work like you expect, or you want it to work
 differently, let me know.

I appreciate the way your module tries to optimize running time by memoizing results of calculations. This, however, is a potential memory leak. Only applications asking for the same calculations over and over will draw notable benefit from it. Therefore, I would rather have the module just do the calculations and let the application take care of memoizing (if appropriate) elsewhere.

I added the memoizing when I noticed the same year being calculated several times. I'm interested in the possible memory leak, could you explain more how this can happen?


In order to simply speed up the process of calculating several
dates with different constant offsets from one specific Easter
Sunday it already would help to store the year and Easter
date of one calculation in the DateTime::Event::Easter object.
As in that case the memory footprint would be a small constant,
I would not object.

The object is currently used to store which offset is being talked about .. an object is for 'Palm Sunday'. You then pass various dates and ask for previous/next/closest etc. This offset is already stored there.


By the way, I wonder if the eastern Orthodox actually use
astronomical observations for the moon cycle but not for
the equinox.  If the rule is astronomical in every respect you
will of course get Easter Sundays at arbitrary Gregorian dates,
not only in April or late March.

They're always around the same time as the western Easter, the Equinox doesn't change .. its still on Gregorian March 21st (or if they observe the astronomical equinox they *might* observe March 22nd), and they get the next Astronomical full moon after that which only ever differs by a day or two. Thus Easter can only ever be a week earlier or later IIRC.


Cheers, and thanks
Rick


-- -------------------------------------------------------- There are 10 kinds of people: those that understand binary, and those that don't. -------------------------------------------------------- The day Microsoft makes something that doesn't suck is the day they start selling vacuum cleaners -------------------------------------------------------- "Write a wise proverb and your name will live forever." -- Anonymous --------------------------------------------------------

Reply via email to