Closed vimarx closed 10 months ago
ith medium-to-large apps, the model generation throws an Out-of-Memory exception
model generation on what context? Run with Debugger?, without Debugger?, what platform? need as many details as u can think
Win app, runtime, without a debugger. If you take a look at the generated Modecache.xafml, it is too large.
are these extradiffs to blame? can u tell?
how large is the cache file
how large is the cache file
In a production app (1200 bo, 10000 properties),, model cache is about 60mg (attached) and memory consumption increase to 8000 megabytes during model generation, while in normal use, it uses about 500 mg. Model.Cache.xafml.zip
Huge app how long it takes to runtime with debugger attached?
Huge app how long it takes to runtime with debugger attached?
a couple of minutes, but memory requirement breaks my debugger session for this app.
I'm curious about the repeated '<ColumnInfo Id> </ColumnInfo>'
that is automatically generated for EACH column ...
the ModelMapper can be improved to globally prevent caching but at the moment it is possible to experiement your self
class MyClass:ModelNodesGeneratorUpdater<ModelViewsNodesGenerator> {
public override void UpdateNode(ModelNode node) {
((ModelNode) node.GetValue("MyCustomObject")).SetValue(ModelValueNames.NeedsCachingKey, false);
}
}
Replace the MyCustomObject with large model trees u have e.g. GridView, Dashboard etc. and let me know your results please
the MyClass needs registration in your Module.cs
GridView
what is the exactly string "GridView" , "GridViewOptions"? they give null reference
the position u try to invoke the GridViewOptions is wrong the node
is an IModelVIews
interface
u have to find the location its the root of each map
so for the screenshot u have a GridView
property in the IModelListView interface and since u have an IModelViews u can enumerate it and change the caching behaviour as in the snippet
Not sure what I'm doing ... but something as
class MyClass : ModelNodesGeneratorUpdater<ModelViewsNodesGenerator>
{
public override void UpdateNode(ModelNode node) { node.SetValue(ModelValueNames.NeedsCachingKey, false); }
}
do not reduce or change output modelcache file
hmm I would expect this to effect all VIews, need to ask the XAF team I will get back to u on this on Mon
We will try to answer all questions that do not require research within 24hr. To prioritize cases that require research we use the following labels in order. For all other issues the posting time is respected.
This case is prioritized.
Issue is deprioritized
as no Assignee found
and scheduled for auto-close
if no activity in the next 60 days
. Thanks a lot for your contribution.
Closing issue for age. Feel free to reopen it at any time.
.Thank you for your contribution.
test.zip If you enable Model Caching (https://docs.devexpress.com/eXpressAppFramework/DevExpress.ExpressApp.XafApplication.EnableModelCache) expand generates a lot of unnecessary nodes. Attached test.zip with demo program and Model Cache file, if you analyze it, you can see a very unuseful node info for each column, something as `
Please note, that also, with medium-to-large apps, the model generation throws an Out-of-Memory exception while trying to generate model cache. Memory consumption is nearly 10 x during this process