Hi,<br><br>As I understand from the online document, class slots with :allocation :class are not persisted. Is there any plan to change that soon?<br><br>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.<br>
<br>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 (by map-class) the instances (about 5000) will take about 8 seconds (my laptop is not that powerful, but quite decent).<br>
<br>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 check-points, such as when a new instance is persisted or when a instance is deleted/modified. The functions could be named as "on-delete, on-add, on-modified. This way we can keep an up-to-date count all the time. Actually, class slot like "count" may even be made ready for the user to use directly without any addition user code.<br>
<br>Counting instances of a class seems to be a very common use case. So I hope the above is convincing enough for the need of persistent class slots. But I am too inexperienced to know how much work this will require.<br>
<br>Thanks for any comments.<br><br>Warren<br>