jQuery的$就调用函数是缓慢的第一次

编程入门 行业动态 更新时间:2024-10-27 05:28:23
本文介绍了jQuery的$就调用函数是缓慢的第一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用$就来更新数据库中的值。当页面使Ajax调用的第一次,它是缓慢的。它正在像5或6秒钟将返回结果。在第一次请求之后,它是快速。我不知道是否有一种方法,使第一个电话也快。如果您有任何意见,请让我知道。

I am using $.ajax to update some values in the database. when the page makes the ajax call for the first time, it is slow. it is taking like 5 or 6 seconds to return the result. after the first request, it is fast. I am not sure if there is a way to make the first call also fast. if you have any ideas, please let me know.

谢谢, 斯里达尔

推荐答案

我的怀疑是,该数据库是做一些缓存和后续请求从缓存中填充的。如果这是仅发生在数据的第一请求,而不管所涉及的数据,然后我会怀疑是你连接到需要的web服务也可以加载到存储器上的第一操作

My suspicion would be that the database is doing some caching and subsequent requests are filled from the cache. If this were only happening on the first request of the data, regardless of the data involved, then I would suspect that the web service that you're connecting to needs to be loaded into memory on the first operation.

更多推荐

jQuery的$就调用函数是缓慢的第一次

本文发布于:2023-11-16 17:11:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1606234.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   缓慢   jQuery

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!