Skip to content

Minimise memory usage of Hypha #4520

@frjo

Description

@frjo

According to Scout it is the "SubmissionDetailView" that consumes most memory.

Especially the template "stream_forms/includes/file_field.html". Does this template somehow load the files themself?

{% load i18n heroicons apply_tags %}
<a class="flex justify-between items-center py-2 px-3 mb-2 max-w-2xl font-medium rounded-sm border transition-colors not-prose bg-slate-50 hover:bg-slate-200"
href="{{ file.url }}"
target="_blank" rel="noopener noreferrer"
title="View file - {{ file.filename }}"
>
<span class="text-sm truncate">
{% heroicon_mini "document-text" class="inline align-text-bottom" aria_hidden=true %}
{{ file.filename|truncatechars_middle:45 }}
<span class="text-xs text-fg-muted">
<span class="sr-only">{% trans "uploaded" %}</span>
<span aria-hidden></span>
<relative-time datetime={{ file.modification_time|date:"c" }}>{{ file.modification_time|date:"SHORT_DATE_FORMAT" }}</relative-time>
</span>
</span>
<span>
{% heroicon_mini "arrow-down" class="inline align-text-bottom rounded-sm" aria_hidden=true %}
</span>
</a>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementThis is an improvement of an existing thing (not a new thing, which would be a feature).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions