<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6137</bug_id>
          
          <creation_ts>2014-04-09 04:59:35 +0000</creation_ts>
          <short_desc>excessive load time for All Recipes page</short_desc>
          <delta_ts>2015-08-07 14:27:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>1.6.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.7 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Reyna">david.reyna</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>cristiana.voicu</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Mihail Stanciu">stanciux.mihail</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>42414</commentid>
    <comment_count>0</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2014-04-09 04:59:35 +0000</bug_when>
    <thetext>The All Recipes page has redundant foreign key table counts, each of which are very expensive and causes the page to load slowly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42415</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2014-04-09 05:01:08 +0000</bug_when>
    <thetext>The simple solution from Dave Lerner is to use the &quot;with&quot; keyword to only calculate these values once per page, for example:

    {% with deps=recipe.r_dependencies_recipe.all %}
    {% with count=deps.count %}
    ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43196</commentid>
    <comment_count>2</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2014-05-08 18:52:38 +0000</bug_when>
    <thetext>Refactoring:

- it loads the entirety of the Recipe Dependency table into memory; this doesn&apos;t scale with the number of builds
- it has whitespace problems</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44157</commentid>
    <comment_count>3</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2014-06-24 13:07:00 +0000</bug_when>
    <thetext>I have loading at 681ms on my machine. Can we set up target times ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44865</commentid>
    <comment_count>4</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2014-07-31 14:11:22 +0000</bug_when>
    <thetext>Need to understand if this is still a problem. Targeting M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45160</commentid>
    <comment_count>5</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2014-08-18 15:41:44 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I have loading at 681ms on my machine. Can we set up target times ?

We can probably work out a target time by looking at the loading times in all other pages from Toaster 1.6. I&apos;ll ask QA to see if they can help with this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45199</commentid>
    <comment_count>6</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2014-08-22 12:28:49 +0000</bug_when>
    <thetext>Mihail has run some load time tests for us (see below). David, Alex, is this enough to decide what to do with this bug?


**** 

Here’s the page load times I got after doing a bit of testing with wget:
 
recipes: ~1780 ms
tasks: ~1540ms
packages: ~1440 ms
time: ~1560ms
cpu: ~1550ms
disk I/O: ~1600ms
image info: ~4000ms
configuration: ~5000ms
 
These tests were done on a Fedora machine, 8 GB RAM, i7-2600 CPU @ 3.40GHz quad-core, tested on a core-image-sato image and most importantly, DB used was sqlite. I suspect this is why the times I got were significantly larger than AlexD’s example time.

Note that the first load test for all these pages were ignored, as they were significantly larger than the rest of the results (usually 2x to 3x larger) due to increased disk access time, I suspect.
 
Cheers,
Mihail</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45433</commentid>
    <comment_count>7</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2014-09-08 09:25:22 +0000</bug_when>
    <thetext>After checking with David Reyna, he is happy to mark this bug as resolved - fixed based on this patch

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=bf9ff3de5f24ffabbf7093f0664730f22d31f191

and the load times gather by QA.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45438</commentid>
    <comment_count>8</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2014-09-08 10:51:40 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>