Element

LDraw

Photo

DJDT

Time

Resource usage

Resource Value
User CPU time 132.378 msec
System CPU time 1.891 msec
Total CPU time 134.269 msec
Elapsed time 147.038 msec
Context switches 26 voluntary, 2 involuntary

Browser timing

Timing attribute Timeline Milliseconds since navigation start (+length)

SQL queries from 1 connection

  • default 12.88 ms (14 queries )
Query Timeline Time (ms) Action
SELECT "lego_part"."id",
       "lego_part"."part_num",
       "lego_part"."name",
       "lego_part"."part_cat_id",
       "lego_part"."notes",
       "lego_part"."is_active",
       "lego_part"."search_vector",
       "lego_part"."ldraw_part_id",
       "lego_part"."bricklink_part_id",
       "lego_part"."ignore_color_errors",
       "lego_part"."part_material_id",
       "lego_part"."is_bricklink_minifig",
       "lego_part"."is_bricklink_book",
       "lego_part"."is_bricklink_gear",
       "lego_part"."show_generic_part_msg",
       "lego_partcategory"."id",
       "lego_partcategory"."name",
       "lego_partcategory"."part_count",
       "lego_partcategory"."img",
       "lego_partcategory"."slug",
       "lego_partmaterial"."id",
       "lego_partmaterial"."name",
       "lego_partoverlay"."part_id",
       "lego_partoverlay"."length",
       "lego_partstats"."part_id",
       "lego_partstats"."num_sets",
       "lego_partstats"."num_mocs",
       "lego_partstats"."num_set_parts",
       "lego_partstats"."num_moc_parts",
       "lego_partstats"."y1",
       "lego_partstats"."y2",
       "lego_partstats"."is_dirty"
  FROM
"lego_part"
 INNER JOIN
"lego_partcategory"
    ON
("lego_part"."part_cat_id" = "lego_partcategory"."id")
 INNER JOIN
"lego_partmaterial"
    ON
("lego_part"."part_material_id" = "lego_partmaterial"."id")
  LEFT OUTER JOIN
"lego_partoverlay"
    ON
("lego_part"."id" = "lego_partoverlay"."part_id")
  LEFT OUTER JOIN
"lego_partstats"
    ON
("lego_part"."id" = "lego_partstats"."part_id")
 WHERE
"lego_part"."part_num" = '3036'
 LIMIT
21
SELECT ••• FROM "lego_part" INNER JOIN "lego_partcategory" ON ("lego_part"."part_cat_id" = "lego_partcategory"."id") INNER JOIN "lego_partmaterial" ON ("lego_part"."part_material_id" = "lego_partmaterial"."id") LEFT OUTER JOIN "lego_partoverlay" ON ("lego_part"."id" = "lego_partoverlay"."part_id") LEFT OUTER JOIN "lego_partstats" ON ("lego_part"."id" = "lego_partstats"."part_id") WHERE "lego_part"."part_num" = '3036' LIMIT 21
0.82

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(632)
  part = get_object_or_404(Part.all_objects, part_num=part_num)

SELECT "lego_element"."id",
       "lego_element"."part_id",
       "lego_element"."color_id",
       "lego_element"."element_id",
       "lego_element"."design_id",
       "lego_element"."descr",
       "lego_element"."color_descr",
       "lego_element"."last_download_attempt",
       "lego_element"."num_download_attempts",
       "lego_element"."is_export_id",
       "lego_element"."is_active"
  FROM
"lego_element"
 INNER JOIN
"lego_color"
    ON
("lego_element"."color_id" = "lego_color"."id")
 WHERE
("lego_element"."is_active" AND "lego_element"."part_id" IN (7331))
 ORDER BY
"lego_color"."name" ASC, "lego_element"."element_id" ASC
SELECT ••• FROM "lego_element" INNER JOIN "lego_color" ON ("lego_element"."color_id" = "lego_color"."id") WHERE ("lego_element"."is_active" AND "lego_element"."part_id" IN (7331)) ORDER BY "lego_color"."name" ASC, "lego_element"."element_id" ASC
8.86

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(632)
  part = get_object_or_404(Part.all_objects, part_num=part_num)

SELECT "lego_partcolorstats"."id",
       "lego_partcolorstats"."part_id",
       "lego_partcolorstats"."color_id",
       "lego_partcolorstats"."num_sets",
       "lego_partcolorstats"."num_mocs",
       "lego_partcolorstats"."num_set_parts",
       "lego_partcolorstats"."num_moc_parts",
       "lego_partcolorstats"."y1",
       "lego_partcolorstats"."y2",
       "lego_partcolorstats"."is_dirty",
       "lego_partcolorstats"."ignore_color_errors"
  FROM
"lego_partcolorstats"
 WHERE
"lego_partcolorstats"."part_id" IN (7331)
SELECT ••• FROM "lego_partcolorstats" WHERE "lego_partcolorstats"."part_id" IN (7331)
0.34

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(632)
  part = get_object_or_404(Part.all_objects, part_num=part_num)

SELECT "lego_partcost"."id",
       "lego_partcost"."part_id",
       "lego_partcost"."color_id",
       "lego_partcost"."is_used",
       "lego_partcost"."cost_avg",
       "lego_partcost"."cost_min",
       "lego_partcost"."cost_max",
       "lego_partcost"."cost_count"
  FROM
"lego_partcost"
 WHERE
"lego_partcost"."part_id" IN (7331)
SELECT ••• FROM "lego_partcost" WHERE "lego_partcost"."part_id" IN (7331)
0.30

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(632)
  part = get_object_or_404(Part.all_objects, part_num=part_num)

SELECT "lego_partphoto"."id",
       "lego_partphoto"."part_id",
       "lego_partphoto"."color_id",
       "lego_partphoto"."submitted_by_id",
       "lego_partphoto"."image",
       "lego_partphoto"."timestamp",
       "lego_partphoto"."is_active",
       "lego_partphoto"."is_primary"
  FROM
"lego_partphoto"
 WHERE
("lego_partphoto"."is_active" AND "lego_partphoto"."part_id" IN (7331))
SELECT ••• FROM "lego_partphoto" WHERE ("lego_partphoto"."is_active" AND "lego_partphoto"."part_id" IN (7331))
0.19

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(632)
  part = get_object_or_404(Part.all_objects, part_num=part_num)

SELECT "lego_color"."id",
       "lego_color"."name",
       "lego_color"."rgb",
       "lego_color"."is_trans",
       "lego_color"."fuzzy_color_id",
       "lego_color"."is_active"
  FROM
"lego_color"
 WHERE
("lego_color"."is_active" AND "lego_color"."id" = 321)
 LIMIT
21
SELECT ••• FROM "lego_color" WHERE ("lego_color"."is_active" AND "lego_color"."id" = 321) LIMIT 21
0.09

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(637)
  color = get_object_or_404(Color, id=color_id)

SELECT "lego_partcolorstats"."id",
       "lego_partcolorstats"."part_id",
       "lego_partcolorstats"."color_id",
       "lego_partcolorstats"."num_sets",
       "lego_partcolorstats"."num_mocs",
       "lego_partcolorstats"."num_set_parts",
       "lego_partcolorstats"."num_moc_parts",
       "lego_partcolorstats"."y1",
       "lego_partcolorstats"."y2",
       "lego_partcolorstats"."is_dirty",
       "lego_partcolorstats"."ignore_color_errors"
  FROM
"lego_partcolorstats"
 WHERE
("lego_partcolorstats"."color_id" = 321 AND "lego_partcolorstats"."part_id" = 7331)
 LIMIT
21
SELECT ••• FROM "lego_partcolorstats" WHERE ("lego_partcolorstats"."color_id" = 321 AND "lego_partcolorstats"."part_id" = 7331) LIMIT 21
0.11

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(652)
  part_stat = get_or_none(PartColorStats.objects, part=part, color=color)

/home/nathan/rb/site/./rb/utils.py in get_or_none(605)
  return manager.get(**kwargs)

SELECT "lego_changelog"."id",
       "lego_changelog"."timestamp",
       "lego_changelog"."user_id",
       "lego_changelog"."model",
       "lego_changelog"."instance_id",
       "lego_changelog"."set_num",
       "lego_changelog"."part_num",
       "lego_changelog"."old_value",
       "lego_changelog"."new_value"
  FROM
"lego_changelog"
 WHERE
("lego_changelog"."instance_id" = 7331 AND "lego_changelog"."model" = 'Part')
 ORDER BY
"lego_changelog"."timestamp" DESC
SELECT ••• FROM "lego_changelog" WHERE ("lego_changelog"."instance_id" = 7331 AND "lego_changelog"."model" = 'Part') ORDER BY "lego_changelog"."timestamp" DESC
1.07

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(659)
  changes = part.get_change_summary()

/home/nathan/rb/site/./lego/models/parts.py in get_change_summary(961)
  changes = ChangeLog.get_changes(part_id=self.id)

/home/nathan/rb/site/./lego/models/changes.py in get_changes(276)
  if len(changes) > 0:

SELECT "lego_partphoto"."id",
       "lego_partphoto"."part_id",
       "lego_partphoto"."color_id",
       "lego_partphoto"."submitted_by_id",
       "lego_partphoto"."image",
       "lego_partphoto"."timestamp",
       "lego_partphoto"."is_active",
       "lego_partphoto"."is_primary",
       "lego_color"."id",
       "lego_color"."name",
       "lego_color"."rgb",
       "lego_color"."is_trans",
       "lego_color"."fuzzy_color_id",
       "lego_color"."is_active",
       "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined"
  FROM
"lego_partphoto"
 INNER JOIN
"lego_color"
    ON
("lego_partphoto"."color_id" = "lego_color"."id")
 INNER JOIN
"auth_user"
    ON
("lego_partphoto"."submitted_by_id" = "auth_user"."id")
 WHERE
("lego_partphoto"."color_id" = 321 AND "lego_partphoto"."part_id" = 7331)
 ORDER BY
"lego_color"."name" ASC
SELECT ••• FROM "lego_partphoto" INNER JOIN "lego_color" ON ("lego_partphoto"."color_id" = "lego_color"."id") INNER JOIN "auth_user" ON ("lego_partphoto"."submitted_by_id" = "auth_user"."id") WHERE ("lego_partphoto"."color_id" = 321 AND "lego_partphoto"."part_id" = 7331) ORDER BY "lego_color"."name" ASC
0.26

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(661)
  part_photos_html = render_part_photos(request, part, color)

/home/nathan/rb/site/./lego/views/parts.py in render_part_photos(682)
  for photo in all_photos:

SELECT "countries_plus_country"."iso",
       "countries_plus_country"."iso3",
       "countries_plus_country"."iso_numeric",
       "countries_plus_country"."fips",
       "countries_plus_country"."name",
       "countries_plus_country"."capital",
       "countries_plus_country"."area",
       "countries_plus_country"."population",
       "countries_plus_country"."continent",
       "countries_plus_country"."tld",
       "countries_plus_country"."currency_code",
       "countries_plus_country"."currency_symbol",
       "countries_plus_country"."currency_name",
       "countries_plus_country"."phone",
       "countries_plus_country"."postal_code_format",
       "countries_plus_country"."postal_code_regex",
       "countries_plus_country"."languages",
       "countries_plus_country"."geonameid",
       "countries_plus_country"."neighbours",
       "countries_plus_country"."equivalent_fips_code"
  FROM
"countries_plus_country"
 WHERE
"countries_plus_country"."iso" = 'US'
 LIMIT
21
SELECT ••• FROM "countries_plus_country" WHERE "countries_plus_country"."iso" = 'US' LIMIT 21
0.28

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(673)
  return render(request, 'parts/part_color_details.html', context)

/home/nathan/rb/site/./rb/templatetags/rb_geo.py in geo_currency(20)
  geo_data = user.geo.get_user_currency()

/home/nathan/rb/site/./geo/geo.py in get_user_currency(252)
  country = Country.objects.get(iso=country_code)

412 </a>
413 </li>
414 <li class="hidden-xs">
415 {% geo_currency request.user %}
416 </li>
417 {% comment %}
418 <li class="hidden-xs hidden-sm">
419 <a href={% if request.user.is_authenticated %}"{% url 'user_profile_settings' request.user.get_username %}#personalisation"{% else %}"#" onclick="return false;"{% endif %} title="All date/times are being converted to this timezone">{% get_user_timezone request.user %}</a>

/home/nathan/rb/site/rb/templates/rb/base_root.html

SELECT "lego_color"."id",
       "lego_color"."name",
       "lego_color"."rgb",
       "lego_color"."is_trans",
       "lego_color"."fuzzy_color_id",
       "lego_color"."is_active"
  FROM
"lego_color"
 WHERE
"lego_color"."id" = 321
 LIMIT
21
SELECT ••• FROM "lego_color" WHERE "lego_color"."id" = 321 LIMIT 21
0.13

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(673)
  return render(request, 'parts/part_color_details.html', context)

25 <div class="col-xs-4">
26 {% if part.img_photo.img_url %}
27 <a class="lightbox" href="/media/{{ part.img_photo.img_url }}" data-plugin-options='{"type":"image"}'
28 title="{{ part.img_photo.photo.color.name }} submitted by {{ part.img_photo.photo.submitted_by.username }} on {{ part.img_photo.photo.timestamp }}">
29 {% thumbs part.img_photo.img_url settings.THUMBS_OPTIONS_PART_LARGE as img %}
30 <img class="img-responsive" data-src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}">
31 </a>
32 {% else %}

/home/nathan/rb/site/lego/templates/parts/includes/render_part_large_images.html

SELECT "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined"
  FROM
"auth_user"
 WHERE
"auth_user"."id" = 272023
 LIMIT
21
SELECT ••• FROM "auth_user" WHERE "auth_user"."id" = 272023 LIMIT 21
0.11

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(673)
  return render(request, 'parts/part_color_details.html', context)

25 <div class="col-xs-4">
26 {% if part.img_photo.img_url %}
27 <a class="lightbox" href="/media/{{ part.img_photo.img_url }}" data-plugin-options='{"type":"image"}'
28 title="{{ part.img_photo.photo.color.name }} submitted by {{ part.img_photo.photo.submitted_by.username }} on {{ part.img_photo.photo.timestamp }}">
29 {% thumbs part.img_photo.img_url settings.THUMBS_OPTIONS_PART_LARGE as img %}
30 <img class="img-responsive" data-src="{% cachebuster img.url %}" width="{{ img.width }}" height="{{ img.height }}">
31 </a>
32 {% else %}

/home/nathan/rb/site/lego/templates/parts/includes/render_part_large_images.html

SELECT "lego_partphoto"."id",
       "lego_partphoto"."part_id",
       "lego_partphoto"."color_id",
       "lego_partphoto"."submitted_by_id",
       "lego_partphoto"."image",
       "lego_partphoto"."timestamp",
       "lego_partphoto"."is_active",
       "lego_partphoto"."is_primary",
       "lego_color"."id",
       "lego_color"."name",
       "lego_color"."rgb",
       "lego_color"."is_trans",
       "lego_color"."fuzzy_color_id",
       "lego_color"."is_active",
       "auth_user"."id",
       "auth_user"."password",
       "auth_user"."last_login",
       "auth_user"."is_superuser",
       "auth_user"."username",
       "auth_user"."first_name",
       "auth_user"."last_name",
       "auth_user"."email",
       "auth_user"."is_staff",
       "auth_user"."is_active",
       "auth_user"."date_joined"
  FROM
"lego_partphoto"
 INNER JOIN
"lego_color"
    ON
("lego_partphoto"."color_id" = "lego_color"."id")
 INNER JOIN
"auth_user"
    ON
("lego_partphoto"."submitted_by_id" = "auth_user"."id")
 WHERE
("lego_partphoto"."is_active" AND "lego_partphoto"."color_id" = 321 AND NOT "lego_partphoto"."is_primary" AND "lego_partphoto"."part_id" = 7331)
SELECT ••• FROM "lego_partphoto" INNER JOIN "lego_color" ON ("lego_partphoto"."color_id" = "lego_color"."id") INNER JOIN "auth_user" ON ("lego_partphoto"."submitted_by_id" = "auth_user"."id") WHERE ("lego_partphoto"."is_active" AND "lego_partphoto"."color_id" = 321 AND NOT "lego_partphoto"."is_primary" AND "lego_partphoto"."part_id" = 7331)
0.18

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(673)
  return render(request, 'parts/part_color_details.html', context)

46
47 {% include 'parts/includes/render_part_large_images.html' %}
48
49 {% if secondary_photos %}
50 <div class="clearfix">
51 <div class="pull-right">
52 There are <a href="#" class="js-toggle-field" data-field="#secondary_photos">
53 {{ secondary_photos.count }} more photos <i class="fa fa-chevron-down"></i></a> of this Part

/home/nathan/rb/site/lego/templates/parts/part_color_details.html

SELECT "lego_element"."id",
       "lego_element"."part_id",
       "lego_element"."color_id",
       "lego_element"."element_id",
       "lego_element"."design_id",
       "lego_element"."descr",
       "lego_element"."color_descr",
       "lego_element"."last_download_attempt",
       "lego_element"."num_download_attempts",
       "lego_element"."is_export_id",
       "lego_element"."is_active"
  FROM
"lego_element"
 INNER JOIN
"lego_color"
    ON
("lego_element"."color_id" = "lego_color"."id")
 WHERE
("lego_element"."color_id" = 321 AND "lego_element"."part_id" = 7331)
 ORDER BY
"lego_color"."name" ASC, "lego_element"."element_id" ASC
SELECT ••• FROM "lego_element" INNER JOIN "lego_color" ON ("lego_element"."color_id" = "lego_color"."id") WHERE ("lego_element"."color_id" = 321 AND "lego_element"."part_id" = 7331) ORDER BY "lego_color"."name" ASC, "lego_element"."element_id" ASC
0.15

Connection: default

Transaction status: Idle

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/venv_rb310/lib/python3.10/site-packages/ratelimit/decorators.py in _wrapped(30)
  return fn(*args, **kw)

/home/nathan/rb/site/./lego/views/parts.py in part_color_details(673)
  return render(request, 'parts/part_color_details.html', context)

88 <tr>
89 <td>Element IDs</td>
90 <td>
91 {% for e in elements.all %}{{ e.element_id }} {% if e.is_export_id %}<i class="fa fa-check" title="Used in Exports"></i>{% endif %} {% endfor %}
92 </td>
93 </tr>
94 <tr>
95 <td>Num Sets</td>

/home/nathan/rb/site/lego/templates/parts/part_color_details.html

Log messages

No messages logged.