[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14572 - gauger
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14572 - gauger |
Date: |
Thu, 3 Mar 2011 15:31:12 +0100 |
Author: bartpolot
Date: 2011-03-03 15:31:11 +0100 (Thu, 03 Mar 2011)
New Revision: 14572
Modified:
gauger/template.php
Log:
Hacks to optimize instant search for Chrome, IE
Modified: gauger/template.php
===================================================================
--- gauger/template.php 2011-03-03 01:21:07 UTC (rev 14571)
+++ gauger/template.php 2011-03-03 14:31:11 UTC (rev 14572)
@@ -261,13 +261,21 @@
if(text == last_search) return;
last_search = text;
$.cookie(field_search.id, text);
- $( field_search
).parents(".search_realm").find(".search_item").each(function(){
- if($(this).attr('id').indexOf(text) == -1){
- $(this).hide();
- } else {
- $(this).show();
- }
- });
+ if(!$.browser.msie) { /* SORRY, BUT IE IS *SLOW* WITH JQUERY */
+ uls = $("#metrics ul:visible"); /* Nasty hack: */
+ uls.hide(); /* 500x speedup on Chrome */
+ $( field_search
).parents(".search_realm").find(".search_item[id*="+text+"]").show();
+ $( field_search
).parents(".search_realm").find(".search_item:not([id*="+text+"])").hide();
+ uls.show();
+ } else { /* IE SPECIFIC ALGORITHM (x10 speedup on IE) */
+ $( field_search
).parents(".search_realm").find(".search_item").each(function(){
+ if(this.id.indexOf(text) == -1){
+ $(this).hide();
+ } else {
+ $(this).show();
+ }
+ });
+ }
}
function debug(param) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14572 - gauger,
gnunet <=