Re: More WOLips questions: HTML formatting, memory leaks?

Q <[email protected]> Fri, 20 Jun 2008 00:13:22 +1000
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
On 19/06/2008, at 11:12 PM, Will Scheidegger wrote:

> As you can see, I'm getting more and more into it. So thanks for all  
> the help you have provided so far. I do try to consult the wiki  
> first, but some things still remain unanswered... so here my next  
> two questions if I may:
>
> HTML formatting in WOLips produces "strange" to "invalid" code. Is  
> there something strange with my setup or is this generally the case?
> When I format a components HTML file (following this: http://wiki.objectstyle.org/confluence/display/WOL/Refactor+-+Format+HTML+Feature) 
>  my HTML-Code is pretty crippled afterwards with
> 	- spaces before and after the "=" symbol in attributes (i.e.  
> <webobject name = "TextField9" /> instead of <webobject  
> name="TextField9" />)

This settable in Preferences->WOLips->HTML Editor->XML->Spaces Around  
Equals

> 	- empty tags being shortened (i.e. <td /> instead of <td></td>)

These two are both equivalent to a browser or xml parser.

>
> 	- and some funny effects where I'm not 100% sure that it was  
> Eclipse messing things up (e.g. <br ></br>)

There used to be a case where <br> becomes <br></br> (so that is it  
valid XML), then if you reformat again it finally becomes <br />, but  
that was fixed some time ago.

> Does WOLips use it's own HTML formatter? Is there any way I can  
> exchange the HTML formatter being used?

Yes, WOLips uses a customised formatter that knows how to deal with wo  
tags and intelligently preserves surrounding non breaking space. The  
only way to use a different formatter is to open your component's HTML  
file in a different editor (like Aptana for example) and reformat it  
that way, however I would recommend being very careful doing this.  
Mike and I spent quite a bit of time trying to come up with a  
formatter that hopefully doesn't screw up your component template  
nearly as badly as the alternatives do.

> Then I strongly thing that my setup has a serious memory leak. When  
> I run a wo app out of Eclipse which works fine in production with  
> only 32MB RAM, I always get out of memory exceptions after a very  
> short time (e.g. 20 requests) even when I double the amount of ram  
> for the app. Does anyone else experience similar behavior?

Profile your app and find out where the memory is being held. Without  
knowing where the memory is going you can't even begin to speculate  
whether it's a leak, or normal behaviour. This has nothing to do with  
eclipse btw.

-- 
Seeya...Q

Quinton Dolan - [email protected]
Gold Coast, QLD, Australia (GMT+10)
Ph: +61 419 729 806