Uploaded image for project: 'WINDUP - Red Hat Application Migration Toolkit'
  1. WINDUP - Red Hat Application Migration Toolkit
  2. WINDUP-812

Performance: Cache classification vertex lookups from the graph

    XMLWordPrintable

Details

    • Story
    • Resolution: Won't Do
    • Undefined
    • None
    • 2.4.0.Final
    • None
    • None

    Description

      ClassificationService#attachClassification looks up the classification by title every time a classification is being created.
      It could be cached, perhaps directly in ClassificationService.

      (22:17:28) ozizka-FN: The way we attach classifications is a bit weird... DB lookup by title value, then linking that. Every time.
      (22:17:46) ozizka-FN: Maybe the rule could look it up once and then attach the known vertex
      (22:19:16) jsightler: Hmm, that's an interesting idea... essentially the Classification operatio would cache the classification?
      (22:20:19) ozizka-FN: Yeah, that would be even better
      (22:20:36) ozizka-FN: I was thinking the rule could. But keeping it there would be more transparent
      (22:20:55) jsightler: Classification title parameterization would make this more complicated
      (22:20:56) ozizka-FN: Maybe per string
      (22:21:22) ozizka-FN: jsightler: Could make the cache eat more memory.
      (22:21:42) ozizka-FN: But, what it does is,
      (22:22:10) ozizka-FN: the if there is a clsf vertex with that title, it is used
      (22:22:12) ozizka-FN: otherwise created
      (22:22:39) ozizka-FN: so the parametrization makes more classification vertices
      (22:23:17) ozizka-FN: IDK how often it is parametrized
      (22:23:30) ozizka-FN: jsightler:
      (22:23:39) ozizka-FN: How about storing the title in an edge properties
      (22:23:54) ozizka-FN: I guess we are not using edge properties at all anywhere right?
      (22:24:13) ozizka-FN: jsightler: That would allow a single classification vertex while allowing custom messages per file
      (22:24:43) jsightler: ozizka: I don't really see the benefit of that.
      (22:24:54) jsightler: Why would the classification be the same if the title is different?
      (22:25:04) jsightler: Description on the edge might be nice, though.
      (22:25:20) ozizka-FN: jsightler: The benefit would be that we could find files with certain classification, and save data in the graph.
      (22:25:26) ozizka-FN: Potentially
      (22:25:49) jsightler: It sounds like that would actually increase duplicate of data in the graph to me.
      (22:26:01) jsightler: The sharing point is the classification title
      (22:26:22) ozizka-FN: jsightler: Well, the classification may be "Wrong usage of javax.ejb.Foo$X", and perhaps under same classification... Maybe not.
      (22:26:29) ozizka-FN: jsightler: Ok then
      (22:26:48) ozizka-FN: Actually, right. Esp when considering XML rules
      (22:27:11) ozizka-FN: They all create the same classification from the type PoV, right?
      (22:27:14) jsightler: Yeah, we have a lot of things that reuse the same classification title (even across rules)

      (22:30:14) ozizka-FN: There could be a limited cache
      (22:30:25) ozizka-FN: Which would store last 100 keys or so
      (22:30:32) ozizka-FN: That would work for same titles
      (22:30:43) ozizka-FN: but not explode on parametrized ones
      (22:31:11) ozizka-FN: Most frequently used strategy.

      Attachments

        Issue Links

          Activity

            People

              ozizka_jira Ondrej Zizka (Inactive)
              ozizka_jira Ondrej Zizka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: