[ditz-talk] Is it just me or is rendering HTML really slow?
wmorgan-ditz at masanjin.net
Thu Nov 20 09:59:53 EST 2008
Reformatted excerpts from Matthew Wilson's message of 2008-11-18:
> I know I could compare timestamps of the original issue files versus
> their HTML representations, but that seems boring and possibly wrong.
File timestamps are dubious because you have to rely on the revision
control to do the right thing when merges happen. So whatever behavior
you're relying on, it has to be the same under git, darcs, hg, bzr, svn,
and whatever the next big thing is.
You can get a timestamp from ditz by looking at (issue.last_event_time || issue.creation_time). Sheila does this for ordering issues.
But I'm not sure the timestamp is sufficient. After you've generated the
HTML once, you might merge in someone else's changes and have new
comments that occurred *before* the last comment that was there when you
generated the HTML. The ditz timestamp definitely won't reflect that.
So I think Christian's suggestion of a hash of the issue content is
the best strategy. I would add a method to issue that calculates this
(there's #make_id now, but that isn't quite what you want, because it
doesn't include the log_events), maybe store it in a html/.hashes file
or something, and use that to determine what to regenerate.
William <wmorgan-ditz at masanjin.net>
More information about the ditz-talk