Subsonic 3.0.0.3:负载减慢的问题

发布于 2024-08-07 17:43:19 字数 583 浏览 10 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只是在用心讲痛 2024-08-14 17:43:19

你在这里做了两件事:
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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文