Re: [elephant-devel] Persistent class slot

2010-06-18 Thread Warren Lynn
> > You can do that without persistent class slots -- make a counter class and > update its value. > Something like this: > > (defpclass counter () > ((classname :index t :initarg :classname) > (counter :initform 0))) > > Then you can increment it automatically: > > (defmethod initialize-instan

Re: [elephant-devel] Persistent class slot

2010-06-17 Thread Alex Mizrahi
> The issue I have is: I am using Weblocks + Elephant + Postmodern to > display the instances of a class in > paginated web pages. Weblocks needs to know the total count of the > instances to plan the pagination (so it > can display something like "1 of > xxx pages" ). It turns out just counting

Re: [elephant-devel] Persistent class slot

2010-05-30 Thread Warren Lynn
> Why not have a caching get-instance-count function instead? > > Leslie > > I doubt that will work well for datasets on which people are adding/deleting records. If we just cache the count, then we will need to do a recount every time some one adds/deletes some records, which will halt the site f

Re: [elephant-devel] Persistent class slot

2010-05-30 Thread Leslie P. Polzer
Warren Lynn wrote: > So I think a possible solution is to allow a class to have persisted class > slots, like "count". Then, some generic functions can be defined to allow > the user code to update the persisted class slots in a contention safe way > (wrapped in transactions) on some critical che

[elephant-devel] Persistent class slot

2010-05-29 Thread Warren Lynn
Hi, As I understand from the online document, class slots with :allocation :class are not persisted. Is there any plan to change that soon? I first did not think that is such a big deal, but then I encountered a performance issue to which I think persisted class slot may be the answer. The issue