Wicket
  1. Wicket
  2. WICKET-1857

Unfound markup information is not entirely cached even in deployment mode

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.4, 1.4-M3
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None

      Description

      Unfound markup information is not entirely cached even in deployment mode, which causes performance problems. The problem has a very broad effect, because checking for non-existent localised versions of markup causes a lot of cases of unfound markup. This showed up first in our load tests, and was later confirmed by profiling.

      If you don't have the localised version of your markup to your current locale, this markup is looked for but never found. This bug causes the lookup to repeat on every request when the component is repainted, which becomes a major problem in a case with a lot of ajax repaints.

      You can reproduce the problem with Wicket 1.3.3 easily, for example by putting the log4j.logger.org.apache.wicket.markup.MarkupCache=DEBUG setting in log4j.properties and running Wicket examples in deployment mode. I added several items to the Ajax todo list and this appeared in console repeatedly

      DEBUG - MarkupCache - Load markup: cacheKey=org.apache.wicket.examples.ajax.builtin.TodoList$AddItemsContaineren_UShtml
      DEBUG - MarkupCache - Markup not found: org.apache.wicket.examples.ajax.builtin.TodoList$AddItemsContaineren_UShtml

      This is caused by the bug that in MarkupCache, the unfound markup information is stored only in markupCache and not in markupKeyCache. I fixed this in the naïve way but we should really refactor the cache handling so that it does not rely on the same calls being duplicated to markupCache and markupKeyCache .

        Activity

        Hide
        Timo Rantalaiho added a comment -

        Committed fix to both trunk and 1.3.x

        Show
        Timo Rantalaiho added a comment - Committed fix to both trunk and 1.3.x

          People

          • Assignee:
            Timo Rantalaiho
            Reporter:
            Timo Rantalaiho
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development