Menu

#805 TitanUtils_TableContainsIndex should simply lookup instead of iteration

Resolved
nobody
None
2012-09-11
2012-08-08
Anonymous
No

Originally created by: rowaas...@gmail.com

TitanUtils_TableContainsIndex does unnecessary table iteration instead of simple lookup. Considering that it somehow runs 850 times on /reloadui, even on my Core i7 following simple patch shawed 1 second from reloading time. Rewrite this function as:

function TitanUtils_TableContainsIndex(table, index)
    if (table and index and table[index] ~= nil) then
            return index
        end
end

Related

Wiki: Titan_Panel_Version_History

Discussion

  • Anonymous

    Anonymous - 2012-08-15

    Originally posted by: urn...@gmail.com

    Thanks for the suggestion - it is working for me. On to the test team...

    Status: Testing

     
  • Anonymous

    Anonymous - 2012-09-11

    Originally posted by: Honor...@gmail.com

    Resolved in version 5.1.1.50001.

    Status: Resolved

     

Log in to post a comment.