CSLA 性能
我是 CSLA 新手,我只想知道在网格中加载记录时哪些因素可能会影响 CSLA 性能
谢谢
I am new to CSLA, i just want to know what factors that could affect CSLA performance when loading records in a grid
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能面临的问题是由于父子关系而不断调用数据库。
但是,可以通过在存储库中创建一个方法来避免这种情况,该方法将充当缓存,在第一次调用数据库时相应地获取数据并存储受影响的数据,并将这些数据用于进一步的子类并防止进一步的数据库调用。
The issue which may you may face is constant Daatabase calls bacause of Parent Child Relationsship.
But, It can be avoided by creating a method in your repository which will act as Cache by fetchng the data accordingly at its first call to DB and store the fecthed data and use the those data for further child classes and prevent from further DB calls.
CSLA 的性能并没有什么天生的缺点,并且使用 CSLA 不应出现任何其他问题。
使用 CSLA 的开发人员可能会陷入的一个常见陷阱是涉及父/子关系。 该架构可能会导致更多单独的数据库调用,然后是必要的。
这是完全可以避免的,只要您对此问题保持警惕,就可以轻松避免。
There is nothing inheritantly bad with the performance with CSLA and you should not see any additional issues by using CSLA.
A common trap that developers using CSLA can fall into is when it comes to parent/child relationships. The architecture may lead to more seperate database calls then would be necessary.
This is totally avoidable and can easily be avoided as long as you are vigilant of the issue.
我认为,选择正确的刻板印象。 例如,如果您的网格仅用于显示记录,您可以使用 readOnlyListBase,这样它将不包含状态属性,例如 isDirty、isNew 等。
I think, choose the right stereotypes. for example if your grid is for displaying records only, you can use readOnlyListBase, with this it will not include states property such as isDirty, isNew and etc..