Hi, Just a little update on some of the refactoring that is going on.
Probably one of the most important things that I've eliminated is the memory leak. This was being caused by a few things: one was the creation of an Ant project and Jelly Context for each project that was instantiated, the interpolation using Betwixt contributed a little, and the inheritance mechanism using the BeanMap was a big chunk of it. Now for the entire bootstrap it takes 1m55s using 23mb of memory and I have not done any optimization yet i.e. no caching. I have removed the notions of Ant and Jelly from the Project itself and for the entire session only one base Ant project and one base Jelly context are created. Everything for Jelly execution is now localized in the PluginManager which is essentially now a Jelly execution conduit of sorts. The other good news is isolation for plugins. The properties namespace is separated, a layered context is also created upon the base context to provide separation there and the classloaders are separated. The basic idea is that plugins contain goals and those goals rely on the resources of that plugin. Each goal can be considered a separate Jelly script as that's how Werkz functions: to store the Jelly of the goal as the action for the goal. I have modified Werkz to use the Session in all cases where goals are attained and actions executed. So basically goal attainment and action execution can be parameterized. In conjunction with this I have added an AttainGoalListener in Werkz so that Werkz will fire a message to listeners pre/post goal attainment. I use this to modify the Session as a means of passing in specifics for goal attainment. So you run asked to attain goals a,b,c and they belong to plugins x,y,z: before each goal is attained the context is flipped so that the resources required to attain that goal are made present and the context is pushed onto a stack. This may happen repeatedly due to prereqs and attainGoal tags. When a goal is finished being attained it's context is popped off the stack. Everything is functioning right now but the last modification I have to make to Werkz is to make pre/post goals actually goals. Currently they are defined as callbacks and are not attained but fired. So they are outside the scope of the AttainGoalListener and therefore I have some failures because the context is not being switched for pre/post goals. So with some refactoring today I plan to make pre/post goals anonymous goals that decorate specified goals. In this way I hope to make them follow the pattern of a goal so they can be attained and allow me access to the Session before and after they are attained. With that change I will be done the separation. I actually thought I was fine until the touchstone tests failed :-) The next step will be tinkering with the plugins. But it would probably be wise to cut b10 before we move on to rc1. That's it for now. -- jvz. Jason van Zyl [EMAIL PROTECTED] http://tambora.zenplex.org In short, man creates for himself a new religion of a rational and technical order to justify his work and to be justified in it. -- Jacques Ellul, The Technological Society --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
