|
From: Sebastian K. <seb...@mu...> - 2004-07-19 17:30:09
|
On Monday 19 July 2004 18:39, Endre St=F8lsvik wrote: > How about getting rid of the Threads, ALL of them?! BE GONE!!! hey, calm down :) > I mean, WebMacro is a -library-. If I want it to use any cache manager > that use threads, I'll start those myself, and kill them afterwards too. > Although I cannot understand what the good point about this would be: why > not use a WeakHashMap or other weak-style references for the cache? The > default config and impl of the -library- WebMacro is, should most > definately be -lean- and -mean-, not fire up any unhandled -threads-!! > ( Not to mention that thread that updates a "time" long, I think it was > for logging: that must be the most .. useless .. piece of "performance > optimization" ever devised: in a production environment, how many > log-lines are one to expect from WebMacro? The potential synchronization > costs must be thousand-folds worse than the millis-getting, -if- there was > an impact in any way.. ) well. As you've perhaps noticed, Brian removed the clock thread in 2.0b1, s= o=20 no need to worry about it anymore. The only thread remaining is the one=20 responsible for removing templates from the cache after a given period of=20 time and I'm afraid there is no other possibility than to do this with a=20 thread. BTW, the thread is started by a class in the concurrent package,=20 another _library_... ;) However, one could add logic to only start this thread, if the functionalit= y=20 to remove templates from the cache after some time is actually used (e.g.=20 ExpireTime is set to a positive value). > So WebMacro isn't cleaning up after itself? I've always had a problem with > my webapplication "leaking memory" when i restart it dozens of times, > eating up my 64 MB "developer sized memory" for Tomcat after 10-12 > restarts. So WebMacro is the one to blame? And it won't get better in the > next version either? 1.1final is stopping all threads and garbage collection should take care of= =20 the rest, I think, but apparently something does not work (see Mark's=20 problem) completely. In 2.0b1 Brian broke this cleanup functionality, but=20 that's what a beta is for, isn't it? > On a tangent: How's the next version coming along?! ;) well, at least we have some traffic on the list again. :) Regarding the next version: Do we have some functionality to make global=20 "macro-libraries" available via WebMacro.properties, so that template autho= rs=20 do not need to include them in every template? If not, I'd like to add this= =20 functionality. Sebastian =2D-=20 Sebastian Kanthak PGP/GnuPG: http://www.muehlheim.de/~skanthak/pgp.html |