Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9602

colorPalette() slows down javascript in IE

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 3.0.0
    • 3.0.10-RC1
    • Posting
    • None
    • IE6+ WinXP+

    Description

      The current function for generating color palette uses ca.400 document.write()'s function to form an HTML table on a posting page. Somehow it slows down the scripts on a page and especially those using document.selection up to 30 times (moveStart, moveEnd profiles grow from 8-10 to 280-320 ms).
      Surprizingly, its deteriorating effect appears even without actual invoking of a colorPalette() function.

      I wonder is it possible to move from outdated doc.writes to more up-to-date element formation?
      We modified the function so that it compiles the HTML strings for future table elements in a temp. array, then
      join the strings for innerHTML method:
      document.getElementById('ColorTable').innerHTML=tmpArr.join('\r\n')

      --This solution works on any (not so) modern browser and does not hamper scripts running.

      Attachments

        Activity

          People

            bantu Andreas Fischer [X] (Inactive)
            wiolowan wiolowan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: