ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
Re: [TCLCORE] OOhhhh crap
by Donal K. Fellows other posts by this author
May 8 2008 6:54AM messages near this date
Re: [TCLCORE] OOhhhh crap | Re: [TCLCORE] OOhhhh crap
Donal K. Fellows wrote:
>  Damon Courtney wrote:
> > TclOO sucks memory like a damn mind flayer (gratuitous D&D
> > reference).  It uses more than Itcl, for God's sake.  Remove the cruft  
> > and crap and make XOTcl (a tried and tested OO extension) the core.
>  
>  That's quite tricky. xotcl.c is 13kloc, with not that many blank lines
>  or comments. It's also written using a denser coding style than Tcl or
>  Tk (which are deliberately fairly sparse even before allowing for
>  commenting). The net result is that figuring out how to improve that
>  code is distinctly difficult, and would require more investment of
>  effort than I'm personally inclined to do. (Frankly, at that level of
>  complexity, I'd almost rather jump into maintaining the stygian joy of
>  Henry Spencer's magnum opus.)
>  
>  Figuring out where it is consuming memory is something for experts; I'm
>  no expert on the implementation, so all I can do is provide advice once
>  someone else identifies the issue. I suspect, and this is not grounded
>  in deep code inspection and so may be way off base but is founded on a
>  quick scan of their implementation of [next], that the problem is the
>  number of stack frames it uses. (TclOO uses a different approach that is
>  much lighter weight.) Reducing the number of stack frames is *hard*
>  since that's almost certainly a deeply ingrained assumption.

It's been pointed out to me that Damon said TclOO was memory hungry. Oops!

I've a good idea where that memory consumption is coming from (probably
the per-object caches, though maybe also the fact that some structures
are allocated at object construction and not when first used) and hope
to clean that up. It won't change any API in the slightest. The other
possibility was a bug in the code that calculated when to recompile a
method body; that's already fixed in the HEAD, eliminating something
that looked like a memory leak but wasn't technically (it wasn't leaked
as such, just waiting to be recovered).

As for the rest of it, I'll sometimes trade space for time. You can't
always have your cake and eat it.

Donal.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Damon Courtney
Donal K. Fellows
Twylite
Gustaf Neumann
Donal K. Fellows
Donal K. Fellows
Gustaf Neumann
Mark Roseman
Kevin Kenny
Tom Krehbiel
Kevin Kenny
Arjen Markus

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved