Loading ...
Sorry, an error occurred while loading the content.

performance issue

Expand Messages
  • prasadkarri
    Hi, we are using autocomplete widget it works well. we have issues with performance the addListener in _initListItem there are 3 calls
    Message 1 of 2 , Jan 3, 2007
    • 0 Attachment
      Hi,

      we are using autocomplete widget it works well.

      we have issues with performance the addListener in _initListItem
      there are 3 calls

      YAHOO.util.Event.addListener
      (oItem,"mouseover",oSelf._onItemMouseover,oSelf);
      YAHOO.util.Event.addListener
      (oItem,"mouseout",oSelf._onItemMouseout,oSelf);
      YAHOO.util.Event.addListener
      (oItem,"click",oSelf._onItemMouseclick,oSelf);

      which are taking more time rather than my query execution and
      response time.

      Did anybody came across this kinda issue your suggestions will be
      appreciated

      Thanks
    • jennykhan
      Hi there, Those addListener calls should only be executed once, when your AutoComplete object is instantiated, and not for every query. This is part of the
      Message 2 of 2 , Jan 5, 2007
      • 0 Attachment
        Hi there,

        Those addListener calls should only be executed once, when your
        AutoComplete object is instantiated, and not for every query. This is
        part of the overhead of the constructor, but should not affect
        performance as the user interacts with the widget. One way to achieve
        this is to create your AutoComplete object once when the page loads,
        like in the implementation examples here:
        http://developer.yahoo.com/yui/examples/autocomplete/index.html.

        Hope that helps,
        Jenny






        --- In ydn-javascript@yahoogroups.com, "prasadkarri" <prasadkarri@...>
        wrote:
        >
        > Hi,
        >
        > we are using autocomplete widget it works well.
        >
        > we have issues with performance the addListener in _initListItem
        > there are 3 calls
        >
        > YAHOO.util.Event.addListener
        > (oItem,"mouseover",oSelf._onItemMouseover,oSelf);
        > YAHOO.util.Event.addListener
        > (oItem,"mouseout",oSelf._onItemMouseout,oSelf);
        > YAHOO.util.Event.addListener
        > (oItem,"click",oSelf._onItemMouseclick,oSelf);
        >
        > which are taking more time rather than my query execution and
        > response time.
        >
        > Did anybody came across this kinda issue your suggestions will be
        > appreciated
        >
        > Thanks
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.