Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helper処理の見直し #68

Open
fwd-oki opened this issue Mar 31, 2023 · 0 comments
Open

helper処理の見直し #68

fwd-oki opened this issue Mar 31, 2023 · 0 comments

Comments

@fwd-oki
Copy link
Contributor

fwd-oki commented Mar 31, 2023

データリソースに対するコメント一覧を表示する際に、RDBから検索する処理を含むh.get_comment_replyがコメントの件数分実行されてしまう。

          {% for comment in comments %}
            {% set created = comment.created.strftime('%Y/%m/%d %H:%M') %}
            {% set reply = h.get_comment_reply(comment.id) %}
            {% if c.userobj.sysadmin %}
              {% if comment.approval %}
                {% if not reply %}
     == 省略 ==

コメントの件数が増えるほど性能劣化につながることが懸念される為、処理の見直しが必要かと思われる。

対象

  • templates/resource/comment.html
    ※他にも同様の処理をしている箇所があるかもしれません

参考

  • 利活用例の検索画面(search.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant