问题描述
我基于node.js,objection.js,objection-graphql,knex构建graphql服务器。 我的应用程序中大约有200个模型,在建立联系之前,它运行良好。 每个模型均具有3个关联模型,存在多个循环,因此,我使用下一种构造来关联模型:
struct VerticalLine: Shape {
func path(in rect: CGRect) -> Path {
var path = Path()
path.move(to: CGPoint(x: rect.midX,y: rect.minY))
path.addLine(to: CGPoint(x: rect.midX,y: rect.maxY))
return path
}
}
struct ConnectedCircles: View {
var body: some View {
VStack(spacing: 0) {
Circle()
.strokeBorder(Color.blue,lineWidth: 4)
.frame(width: 30,height: 30)
Line()
VerticalLine()
.stroke(Color.blue,lineWidth: 4)
.frame(width: 20,height: 10)
Circle()
.strokeBorder(Color.blue,height: 30)
}
}
}
目前,请求的执行速度降低了10倍以上,或者出现了这样的错误:
modelClass: path.join(__dirname,"tableName").
我分析了sql查询,该查询构建了knex,似乎性能问题不在于sql。
如何解决这个问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)