Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4618

ResourceStreamLocator does a hard-coded resource lookup in "META-INF/resources"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.7, 6.0.0-beta2
    • 1.5.8
    • None
    • None

    Description

      ResourceStreamLocator currently does a hard-coded resource lookup in "META-INF/resources". In deployment, that is not a big problem, since its results are cached. In testing however, this single line is nearly doubling our wallclock time.

      I agree that the lookup is necessary for Servlet 3.0 support, but it should not be just inelegantly hardcoded like that. Our application doesn't use it, yet our tests are hit hard. I profiled one of the worse testcases (roughly 50-60 seconds in 1.4, now 110-120) - we spent over 70% of the time in ResourceStreamLocator#getResourceStream. I tried commenting out just that one call looking for "META-INF/resources" and the test dropped back down to 60 seconds.

      So I'd really like this to be configurable, so I can just get rid of it in test configurations.

      WICKET-4617 will take care of it all in 6.0, because it will introduce a ResourceFinder/ResourcePath for it, which will make it easily configurable.

      For 1.5 I propose giving ResourceStreamLocator itself a list of paths to try (by default "" and "META-INF/resources") instead of hard-coding.

      Objections?

      Attachments

        Activity

          People

            cmenzel Carl-Eric Menzel
            cmenzel Carl-Eric Menzel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: