• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: SOOOO SLOW - found solution

SOOOO SLOW - found solution 13 years 1 week ago #13546

  • chwagssd
  • chwagssd's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
I found a solution for how slow this can be, and here's why - the component runs a search for each keypress, so if you type "t-e-s-t" really fast, that's still 4 searches!

1. Replace on line 28(ish) of mod_rsfinder.php
document.getElementById('rsquick').onkeyup = generateResults;
with
document.getElementById('rsquick').onkeyup = timerGenerateResults;

2. If you add this just before generateResults(e) on line 107 of mod_rsfinder.js


var generateResultsTimer = 0;
var timerGenerateResults = function(evt){
if(generateResultsTimer > 0){
console.log("Cancelled timer " + generateResultsTimer);
clearTimeout(generateResultsTimer);
}
var callback = function(){
generateResults(evt);
}
generateResultsTimer = setTimeout(callback, 1000);
}

This will make sure that keypresses that are less than 1 second in between will not cause multiple searches blocking the XMLHttpRequest thread count of 2 (which brought my searches from 12s to 3)
The administrator has disabled public write access.

Re:SOOOO SLOW - found solution 12 years 11 months ago #13814

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Thank you for the code snippet, we have added it to the RSFinder! package.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!