Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-5672

Performance Improvement of IconPathResolver::resolve()

    XMLWordPrintable

Details

    • Yes

    Description

      Looks like Ibexa\AdminUi\Resolver\IconPathResolver::resolve() in some cases consumes more resources than strictly speaking is needed.

      It is called every time a icon is requests, and you use the same icon many times ( like for instance checkmark ), this function is resolving the same icon path the same amount if time.

      For instance, for rendering the page for editing Article ContentType on a vanilla Experience v4.4.2 installation ( admin/contenttypegroup/1/contenttype/2/update/eng-GB), Ibexa\AdminUi\Resolver\IconPathResolver::resolve() is called 195 times and takes 6.48% of the processing time ( see vanilla_experience_ct_edit_article.PNG ). When editing content types with many more fields, the impact is even greater (see big_db_ct_edit.PNG ). By making a in_memory cachc for this function, the overhead is less than 1% and blackfire totally disregard it in any reporting.

      From https://blackfire.io/docs/profiling-cookbooks/understanding-call-graphs#beyond-the-hot-paths

      Note that part of the data preprocessing done by Blackfire involves removing (aka. pruning) function calls that take less than 1% of the global costs on all dimensions (time, cpu, memory, etc.). This is done to reduce the size of the profiles and to provide a responsive UI. You won’t be able to find these removed nodes in the call graph nor in the functions list.
      

      Icons are used all over in admin-ui, so an optimization will basically benefit most page views in admin-ui

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              vidar.langseid@ibexa.co Vidar Langseid
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: