Closed vimarx closed 4 years ago
ModelCache is Enabled (x86)
whats your reason for this? my guess is that x64 won't fail
there are some workarounds for this but cannot try as i cannot repro
https://bhrnjica.net/2012/07/22/with-net-4-5-10-years-memory-limit-of-2-gb-is-over/ https://blogs.msdn.microsoft.com/calvin_hsia/2010/09/27/out-of-memory-easy-ways-to-increase-the-memory-available-to-your-program/
I'm using x86 because of performance reason
and I don't convince me to have a not-so-complex application witch rise its memory consumption to more than 2gb ... I think there is room for improvement. May I try by disabling ModelINheritance and model adapter modules? how can I do it?
reading the quote from DevExpress again, it leads to the conclusion that without measurements you should not use outdated targets. It refers to some XAF winforms
is your one of them? NGen suugestion also is outdated to my knowldege again is about some cases furthermore MS developed a newer protocolas a replacement to this.
Also note the XVideoRental is using a large model as many modules with ModelMapper are installed and no issues there.
please try the suggestions i posted at and let me know https://github.com/eXpandFramework/eXpand/issues/502#issuecomment-520158335
I dont understand "outdated targets. It refers to some XAF winforms"??
i meant x86 as a target platform
apparently the ME is using arrays that cannot scale thats why u have this issue. I am not sure I just guess
also I can't disable ModelMapper as suggested in ((Xpand.XAF.Modules.ModelMapperModule) Application.Modules.FindModule(typeof(Xpand.XAF.Modules.ModelMapperModule))).Unload();
because out of memory occurs before Setup completes
I compiled as Any CPU and now it starts properly, but its memory consumption during cache or model creation rises to 3.0Giga of RAM!, so I think there is something to look at there
additional notes: XVideorental is compiled on x86 and with ModelCache enable it peeks to 1G with an average of 500Mb.
Having a repro sample we can delegate the problem to DX support
Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.
After upgrading from 19.1.302 to 19.1.502 my solution fails with an out of memory exception when ModelCache is Enabled (x86)
There is any guideline to isolate what raises up memory consumption?
thanks!
The error occurred:
en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) en DevExpress.ExpressApp.Win.WinApplication.SetupCore(String applicationName, IList`1 objectSpaceProviders, ApplicationModulesManager modulesManager, ISecurityStrategyBase security) en DevExpress.ExpressApp.XafApplication.Setup() en VxERP.Win.Program.Main(String[] arguments)
en System.Collections.Generic.Listb__0()
en System.Threading.Tasks.Task.InnerInvoke()
en System.Threading.Tasks.Task.Execute()
InnerException is null
1.set_Capacity(Int32 value) en System.Collections.Generic.List
1.EnsureCapacity(Int32 min) en System.Collections.Generic.List1.Add(T item) en DevExpress.ExpressApp.Model.Core.ModelNode.AddNodeIntoListCore(ModelNode node) en DevExpress.ExpressApp.Model.Core.ModelNode.AddNodeIntoList(ModelNode node) en DevExpress.ExpressApp.Model.Core.ModelNode.AddNodeCore(ModelNode node) en DevExpress.ExpressApp.Model.Core.ModelNode.AddNodeCore(String id, Type type) en DevExpress.ExpressApp.Model.Core.ModelNodeInfo.GenerateNodesByDefault(ModelNode parent) en DevExpress.ExpressApp.Model.Core.ModelNodesDefaultInterfaceGenerator.GenerateNodesCore(ModelNode node) en DevExpress.ExpressApp.Model.ModelNodesGeneratorBase.GenerateNodes(ModelNode node) en DevExpress.ExpressApp.Model.Core.ModelNode.RunNodesGenerator(ModelNodesGeneratorBase generator) en DevExpress.ExpressApp.Model.Core.ModelNode.RunNodesGenerator() en DevExpress.ExpressApp.Model.Core.ModelNode.EnsureNodes(Boolean alwaysCreate) en DevExpress.ExpressApp.Model.Core.ModelNode.GetUnsortedChildren(Boolean inThisLayer) en DevExpress.ExpressApp.Model.Core.ModelNode.GetChildrenForSerialization() en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNodes(XmlElement xmlNode, ModelNode modelNode, XmlDocument currentDocument) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNode(ModelNode modelNode, XmlDocument document) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNodes(XmlElement xmlNode, ModelNode modelNode, XmlDocument currentDocument) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNode(ModelNode modelNode, XmlDocument document) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNodes(XmlElement xmlNode, ModelNode modelNode, XmlDocument currentDocument) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNode(ModelNode modelNode, XmlDocument document) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNodes(XmlElement xmlNode, ModelNode modelNode, XmlDocument currentDocument) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNode(ModelNode modelNode, XmlDocument document) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNodes(XmlElement xmlNode, ModelNode modelNode, XmlDocument currentDocument) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNode(ModelNode modelNode, XmlDocument document) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNodes(XmlElement xmlNode, ModelNode modelNode, XmlDocument currentDocument) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNode(ModelNode modelNode, XmlDocument document) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNodes(XmlElement xmlNode, ModelNode modelNode, XmlDocument currentDocument) en DevExpress.ExpressApp.Model.ModelCacheWriter.SerializeNode(ModelNode modelNode, XmlDocument document) en DevExpress.ExpressApp.Model.ModelCacheWriter.GetSplitModel(IModelNode modelNode) en DevExpress.ExpressApp.ModelCacheManager.SavePrimaryModel(ModelApplicationBase model, ModelCacheWriter writer, Dictionary
2 serializedModel) en DevExpress.ExpressApp.ModelCacheManager.Save(ModelApplicationBase model) en DevExpress.ExpressApp.ApplicationModelManager.CreateUnchangeableLayer(ModelStoreBase[] modelDifferenceStores, Boolean cacheApplicationModelDifferences, ModelStoreBase applicationModelDifferenceStore) en DevExpress.ExpressApp.ApplicationModelManager.Setup(ITypesInfo typesInfo, IEnumerable1 boModelTypes, IEnumerable
1 modules, IEnumerable1 controllers, IEnumerable
1 applicationLocalizerTypes, IEnumerable1 applicationAspects, ModelStoreBase applicationModelDifferenceStore, String modelAssemblyFile) en DevExpress.ExpressApp.XafApplication.CreateModelManager(IEnumerable
1 boModelTypes) en DevExpress.ExpressApp.Win.WinApplication.CreateModelManager(IEnumerable1 boModelTypes) en DevExpress.ExpressApp.XafApplication.Setup(ExpressApplicationSetupParameters parameters) en DevExpress.ExpressApp.XafApplication.SetupCore(String applicationName, IList
1 objectSpaceProviders, ApplicationModulesManager modulesManager, ISecurityStrategyBase security) en DevExpress.ExpressApp.Win.WinApplication.<>n0(String applicationName, IList`1 objectSpaceProviders, ApplicationModulesManager modulesManager, ISecurityStrategyBase security) en DevExpress.ExpressApp.Win.WinApplication.<>cDisplayClass77_0.