Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16545

Improve totaltime calculation

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.3.0
    • Other

      In phpbb, we are calculating the total processing time of a page, but there are currently two issues, or rather code that can be improved:

      • $starttime is currently set in startup.php, and used as global in other methods.
        This appears unneeded: where we need the starttime, we could as well use a variable set by PHP:

        request->server('REQUEST_TIME_FLOAT', 0.0)

      • For starttime, some code uses the string return version of microtime(), to then split the result and sum both parts. This should be replaced with microtime(true). Example from driver.php

      $mtime = explode(' ', microtime())
      

            Unassigned Unassigned
            Tomba Steven De Groote
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: