Re: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory
From: Chris Langston (CLangston_at_horizon-boss.com)
Date: 03/17/04
- Next message: Matt Davey: "Re: Ngen'ing assemblies during install"
- Previous message: aquafoil: "'Server Application Unavailable'"
- In reply to: Niall McDonnell [MSFT]: "RE: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory"
- Next in thread: Chris Langston: "Re: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 17 Mar 2004 09:37:40 -0500
Niall,
I commented out all the <TYPE>CODEVARIABLE</TYPE> and received the same
results. I then also commented out all the <TYPE>CODE</TYPE> and received
the same results. We are using VB.NET and the BaseForm is actually very
small. All it contains is a basic Form and has 1 control on it. The
control that I have on the base Form is a Validator Control. If I leave the
Modifier access as "Friend", I don't get the problem. If I change the
Modifier access to "Public", then the template engine consumes lots of
memory. The form will eventually appear, but usually after 5 minutes and
after it has nearly crashed my computer.
You can duplicate this behavior in any simple application by creating a
BaseForm.vb and adding a Validator Control to the form. Change the Modifier
permissions to Public from Friend. Then create a ChildForm.vb and have it
inherit from BaseForm.vb. When you try to open the ChildForm.vb, this is
where the problem ocurrs.
Any other suggestions?
Thanks,
Chris Langston
"Niall McDonnell [MSFT]" <niallm@online.microsoft.com> wrote in message
news:$fAygv5CEHA.2304@cpmsftngxa06.phx.gbl...
> hi Chris,
> Can you try removing <TYPE>CODEVARIABLE</TYPE> elements from your policy
> file? The presence of these elements causes the policy engine to walk all
> code inside types. If that doesn't help, could you try removing
> <TYPE>CODE</TYPE> elements? The presence of these elements causes the
> policy engine to walk all code as far as types, but not inside types.
>
> If the problem goes away, then the sheer amount of code walking _may_ be
> the issue. What size is the code in UIBase?
>
> Your post seems to imply that the memory consumption only goes up when you
> open a form in UIBase. Can you narrow the problem down to the presence of
> one particular control on the form? If there are CODEVARIABLE elements
> defined, the policy engine examines all controls on the form and their
base
> classes when the form is opened. I wonder if this is causing reflection on
> dlls that aren't otherwise being reflected. It's possible that one or more
> of these dlls is causing difficulties. What language is UIBase written in?
> I believe the reflection only happens when the project contains VB code.
>
> If removing CODEVARIABLE policy elements solves the problem, we need to
see
> if you can get the policy you want without the use of CODEVARIABLE. For
> example would it be suficient to exclude System.Windows.Forms.dll as a
> reference. Or perhaps excluding the defautl WinForm AddItem template might
> be sufficient.
>
> --------------------
> >From: "Chris Langston" <CLangston@horizon-boss.com>
> >Subject: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory
> >Date: Thu, 4 Mar 2004 13:31:21 -0500
> >Lines: 39
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> >Message-ID: <O$$GmbhAEHA.3184@TK2MSFTNGP09.phx.gbl>
> >Newsgroups:
>
microsoft.public.dotnet.distributed_apps,microsoft.public.dotnet.framework,m
>
icrosoft.public.dotnet.framework.performance,microsoft.public.vsnet.debuggin
>
g,microsoft.public.vsnet.enterprise.tools,microsoft.public.vsnet.general,mic
> rosoft.public.vsnet.i
> >NNTP-Posting-Host: horizon-boss.com 69.15.32.254
> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
> >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:66668
> microsoft.public.dotnet.framework.performance:6874
> microsoft.public.vsnet.debugging:5128
> microsoft.public.vsnet.enterprise.tools:1946
> microsoft.public.vsnet.general:17208
> microsoft.public.dotnet.distributed_apps:8603
> >X-Tomcat-NG: microsoft.public.dotnet.framework.performance
> >
> > have an Enterprise Template using a Policy file that I'm experiencing
some
> >strange behavior with. I've racked my brain through the news groups and
> all
> >the examples off of MSDN, but can't seem to locate the what's causing my
> >problem.
> >
> >We are building an enterprise application, with various types of projects
> >
> >Solution
> > BusinessLogic
> > Common
> > DataAccess
> > WinUI
> > - UIBase
> > - UIUser
> >
> >Everything in the templates for the PolicyFiles are working great in all
> the
> >projects except for my WinUI projects. We are using a BaseForm in the
> >UIBase Assembly that Inherits from System.Windows.Forms.Form. All other
UI
> >forms in our application will inherit from BaseForm in the UIBase
Assembly.
> >Here we want to put in a policy that all forms must Inherit from our
> >BaseForm.
> >
> >Here's the problem, if I have a policy file associated with my UIUser
> >assembly files and I open a form that inherits from BaseForm in the
UIBase
> >assembly, the IDE uses up to 1.6 Gigs of Memory. Not until I close the
> form
> >is the memory release. I've set the Policy file to be INLUDE all types
of
> >components, but I still get the same behavior. If I remove the Policy
file
> >from the Project completely, then I don't have the problem at all.
> >
> >Is there a way for me to turn on logging in the IDE to see what is
causing
> >the IDE to use some much memory? Do you have any suggestions on what
else
> I
> >can do to get past this problem. Right now this is pretty much a show
> >stopper in regards to using the PolicyFile as developer productivity
would
> >be severly reduced.
> >
> >I'm using a P4 2.6 Gig Dell machine with 1Gig of Ram and a 60 Gig
> Harddrive,
> >so performance on my machine isn't the problem
> >
> >
> >
>
>
> --
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> Note: For the benefit of the community-at-large, all responses to this
> message are best directed to the newsgroup/thread from which they
> originated.
>
- Next message: Matt Davey: "Re: Ngen'ing assemblies during install"
- Previous message: aquafoil: "'Server Application Unavailable'"
- In reply to: Niall McDonnell [MSFT]: "RE: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory"
- Next in thread: Chris Langston: "Re: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|