Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-114177

Enhance error detection when resolving JS modules

    Details

    • Type: Story
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: Master
    • Component/s: AMD Module Loader
    • Labels:
      None

      Description

      Currently the server code used to resolve AMD modules creates a map with all deployed JS modules before resolving anything. This has two effects:

      1) Most of the data we are computing in advance won't be used for the resolution, so it's a waste of CPU and memory.
      2) Because we add errors when the data is invalid we are creating lots of false positives because we are signaling as errors incorrect modules that are not being used.

      Luckily, we haven't suffered any problem with this because, as the invalid data was not used, nobody noticed.

      The solution will be moving the warnings/errors to a specific place in the server-AMD loader protocol (instead of reusing already existing fields which are not intended to hold errors) and don't analyze more modules than those needed (to avoid wasting CPU, RAM and generating more warnings than necessary).

      This issue depends on https://github.com/liferay/liferay-amd-loader/issues/230

        Attachments

          Activity

            People

            Assignee:
            ivan.zaera Ivan Zaera
            Reporter:
            ivan.zaera Ivan Zaera
            Engineering Assignee:
            Ivan Zaera
            Recent user:
            Kiyoshi Lee
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package
                Master