Subsonic 3.0.0.3:负载减慢的问题
我正在使用 subsonic 3.0.0.3(活动记录),这是一个非常简单的数据库,确实相信它的能力,但我真的对它做任何事情的速度如此之慢感到失望。
出于某种原因,它喜欢不止一次地经历一些事情。 例如:
var newitem = new new_quote_item
{
quote_id = Convert.ToInt32(newQuoteID),
isextra = true,
qty = qty,
measureX = 0,
measureY = 0,
prodid = Convert.ToInt32(prodid)
};
newitem.Save();
// claculate price and add to total
var iteminfo = extra.SingleOrDefault(x => x.id == Convert.ToInt32(prodid));
这将运行两次,但在额外的(亚音速类)内,这可以是 3 或 4 个循环,真的应该能够创建此类一次吗?为什么必须初始化,然后又重新初始化。
以前有人遇到过这样的麻烦吗? 不需要 20 分钟就能得到简单的报价。
谢谢
I'm using subsonic 3.0.0.3 (active record) quite a simple database really, have trusted in its abilities but i am really getting let down by how incredibly slow it it to do anything.
For some reason it likes to run through things more than once.
For example:
var newitem = new new_quote_item
{
quote_id = Convert.ToInt32(newQuoteID),
isextra = true,
qty = qty,
measureX = 0,
measureY = 0,
prodid = Convert.ToInt32(prodid)
};
newitem.Save();
// claculate price and add to total
var iteminfo = extra.SingleOrDefault(x => x.id == Convert.ToInt32(prodid));
that will run twice, but inside extra ( the subsonic classes) this can be 3 or 4 loops, really should it be able to create this class once? Why does it have to be initialized, then initialized all over again.
Has anyone had this kind of trouble before?
It shouldn't take 20 mins to get back a simple quote.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你在这里做了两件事:
1)保存一个新类
2) 将唱片拉出。
这将导致两个查询 - 一个查询 INSERT,另一个查询 SELECT。没有“循环”,我不知道你所说的 3 或 4 个循环和“创建一次类”是什么。您编写代码 - 您已经拥有该对象。
广告长达 20 分钟——我的朋友,那不是 SubSonic。正如你在这里指出的
subsonic、mvc 和 activerecord
SubSonic 非常快,不会花费 20 秒。检查服务器上的内存。
You're doing 2 things here:
1) Saving a new class
2) Pulling the record back out.
This will result in two queries - one to INSERT, the other to SELECT. There are no "loops" and I have no idea what you're saying about 3 or 4 loops and "creating the class once". You write the code - you have the object already.
Ad far as 20 minutes goes - that's not SubSonic my friend. As you noted here
subsonic, mvc and activerecord
SubSonic is pretty quick and won't take 20 seconds. Check the memory on your server.