I use this module/block as a sort of quick find. It lists all titles in alphabetical order. The functionality is great, but I think the speed could be improved. Right now it's doing a form submission via post, which finds the node and then loads the page. It's looking up the same info twice, once when generating the block, the other time when it processes the form. What if instead of doing a post it does a get and it uses q=... or it redirects to node/#nid or even the url alias. That would point you directly to the node in 1 step instead of 2.

Some Ideas
http://webdesign.about.com/od/javascript/f/blfaqddredirect.htm

Comments

danielb’s picture

I will have a think about this. There are use cases where this would not work out, for example when combining two form fields on different taxonomy vocabularies to find the nodes that intersect both terms.

I assume you're talking about select boxes here, because there is a way to have HTML in the autocomplete one to give you a link directly to the page (though that still doesn't stop someone from 'selecting' the option instead of clicking the link and doing the 2nd lookup anyway).

Can you give me info about your specific use case so I can understand the problem better? Even if you are looking up by node title - there still could be a chance two nodes have the same title, which is why the 2nd lookup is there to find all matching nodes. And yet in the autocomplete lists the options are given as unique to avoid confusing the user, so they may see it as being one node - when infact there are two matching nodes.

mikeytown2’s picture

I'm running boost, which is a static cache; the site is fast, except when one uses the autocomplete block (bottom of content labeled "New & Pre-Owned Model Quick Find").
http://www.bluediamondhomeandrv.com/
I'm really not using the actual autocomplete part. It's give a lot of control over what nodes go in the list, and thats why I like it. My static cache gets flushed at midnight PST (-8GMT) and is usually rebuild by 2am. Doing a speed comparison during that time would be pointless.

One way to go about this would be to use JS to rewrite the html (that way it degrades gracefully). Have the JS detect if more then one was picked. If more then one, handle like normal; if only one, cut out the middle man.

danielb’s picture

Yes I can see it is significantly slower to use the node finder than it is to simply click a link on your site.
I will make more effort to improve performance.

I can't give you a solution now other than to suggest using a different module such as Node Quick Find, or use Views to create a list of links to all those houses and use CSS to make them into a drop down menu.

mikeytown2’s picture

Here's another idea, that I don't have a clue about how to implement. Use Drupal_Bootstrap to only load what you need, so it returns the request faster.
Example of this in action: http://drupal.org/project/authcache
If all this does is work the DB then just "booting up" DRUPAL_BOOTSTRAP_DATABASE should save a lot of time. I don't know what needs to be loaded in order to accomplish this, but I think bootstrapping drupal could speed this module up.

danielb’s picture

Status: Active » Postponed (maintainer needs more info)

I don't know how to implement that either.

danielb’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'm looking into other ways to speed things up a bit in the Finder module.