大对象计数和管理 [英] Large Object Count and Management

查看:91
本文介绍了大对象计数和管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有架构问题/问题。我在WinForms应用程序中使用MVP模式,它在我们开始时运行良好,但我想知道我是否可以从对象管理中获得一些输入。我相信我正在加载太多大型对象,因为我的内存使用量增长非常快,是否存在一种模式或其他不太正式的模式,其他人已经习惯用更多JIT技术加载对象,因此GUI保持响应但不会过度膨胀。 br />
只是为了获得更多信息,我正在使用这些对象的很大一部分构建树视图,并且我有一个对象层次结构 -

会话包含包含珠子的样本。在树中选择样本后,面板将加载Sample对象中包含的数据以及Bead对象列表中的所有珠子。我担心的是,如果用户选择在树视图中加载100+会话,我的对象将很快吸收所有可用内存。

I have an architecture issues/question.  I am using the MVP pattern in our WinForms application, it is working out well as we begin but I am wondering if I can get some input from you all on object management.  I believe that I am loading too many large objects up front as my memory usage grows quite rapidly is there a pattern or something less formal that others have used to load objects in a more JIT technique so the GUI stays responsive  but not over bloated.

Just for some more information, I am building a treeview with a good portion of these objects and I have an object hierarchy of --

Session contains Samples which contain Beads.  Upon selection of a Sample with in the tree a panel is loaded with the data contained within the Sample object and all of the beads in the list of Bead objects.  My concern is if a user choose to load 100+ session in the treeview my objects will quickly absorb all of the memory available.

推荐答案


<首先,我想再次确认它是一个winform应用程序还是一个网站,因为你已经谈过会话。可以做的主要是:1。尽可能将对象从会话移动到缓存和上下文对象。可以使用延迟装载。一旦您提出申请类型,我们可以进一步说明这一点。

问候
TicArch
Hi,

First of all, i would like to reconfirm whether it is a winform application or a website as you have talked about session.\
Main thing which can be done are:
1. Wherever possible, move objects from session to cache and context objects.
2. Lazy loading can be used
We can dicuss this further once you come out with type of application.

Regards
TicArch


这篇关于大对象计数和管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆