如何提高jQuery的自动完成的性能 [英] How to improve performance of Jquery autocomplete

查看:123
本文介绍了如何提高jQuery的自动完成的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正打算使用jQuery自动完成了一个网站,并实现了一个测试版本。林现在使用Ajax调用来检索每个字符的输入字符串的一个新的列表。的问题是,它填充了新的列表之前得到相当慢,1.5秒。是什么使自动完成快速的最好方法?即时通讯使用CakePHP,只是做了查找和使用的10个项目的限制。

I was planning to use jquery autocomplete for a site and have implemented a test version. Im now using an ajax call to retrieve a new list of strings for every character input. The problem is that it gets rather slow, 1.5s before the new list is populated. What is the best way to make autocomplete fast? Im using cakephp and just doing a find and with a limit of 10 items.

推荐答案

这篇文章 - 如何 Flickr的不会自动完成是一个很好的阅读。我有几个哇体验阅读。

This article - about how flickr does autocomplete is a very good read. I had a few "wow" experiences reading it.

这个小工具下载所有的列表
  您的联系人,在JavaScript中,在
  根据200毫秒(这是真的甚至
  与10000联系人成员)。在
  为了获得这个级别的
  表现,我们不得不完全
  重新思考如何从发送数据
  服务器到客户机

"This widget downloads a list of all of your contacts, in JavaScript, in under 200ms (this is true even for members with 10,000+ contacts). In order to get this level of performance, we had to completely rethink how we send data from the server to the client."

这篇关于如何提高jQuery的自动完成的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆