Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
381 views
in Technique[技术] by (71.8m points)

for循环数据量很大,很卡

现在有一个功能是 先去找数据库 需要抓取的数据
然后 for循环,先调用第三方的接口,然后操作一下,入库
最后for循环完了一次性提交事物
这回导致很卡,有什么办法吗


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

把循环调用接口改成一次性批处理


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...