ViewMap vs MediatorMap for injection purpose only

pavel.fljot's Avatar

pavel.fljot

28 Nov, 2013 11:07 AM

I haven't done any tests, therefore I admit immediately and in advance that I'm a piece of lazy ass.
Yet, If anyone has some information — it would be very helpful =)

In a legacy project I have found that previous developers were using mediators for some custom Flex components just to inject ("manually" through corresponding mediators) some localization managers and other helpers. Though you could simply map view via ViewMap. They briefly mentioned that it's because "parsing heavy views is less efficient". And I assumed there's some caching in SwiftSuspenders, so I guess it actually should be more efficient to rely on ViewMap.

  • I'm talking about ~5 custom component types and more than 100 instances to inject to.
  1. Support Staff 1 Posted by Ondina D.F. on 28 Nov, 2013 04:48 PM

    Ondina D.F.'s Avatar

    Hey Pavel,

    Tsk, tsk, no tests? Just kidding.

    I've only heard about massive performance issues when using the ViewMap and the MediatorMap together, but I might be wrong.
    There are lots of discussions on this topic, and lots of opinions, but you've probably seen them already:
    http://knowledge.robotlegs.org/search?q=performance&recommend=1...

    http://knowledge.robotlegs.org/discussions/problems/65-massive-perf...

    On a side note, tell me, why don't you use robotlegs 2? ;)

    Ondina

  2. 2 Posted by pavel.fljot on 28 Nov, 2013 06:40 PM

    pavel.fljot's Avatar

    Ondina,

    sure I've checked other topics before, but haven't found this particular kind of discussion.
    But at least I've checked that version of SwiftSuspenders, Till is indeed caching the result of describeType, so I guess the less viewMap.mapType() and the more instances you have — better you inject directly into components (in my case).

    Our team uses Robotlegs 2 for the recent project, but for the old one it just doesn't make sense to switch at this point.

  3. Support Staff 3 Posted by Ondina D.F. on 29 Nov, 2013 09:18 AM

    Ondina D.F.'s Avatar

    but for the old one it just doesn't make sense to switch at this point.

    Understandable. I guess, I was worried you didn't like Robotlegs 2 :P

  4. Ondina D.F. closed this discussion on 12 Mar, 2014 10:10 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac