6 Replies Latest reply on Sep 29, 2011 3:30 AM by Lee Hui

    Performance concers

    Nathanvdk Level 1

      At the moment, we are in the final stage of releasing our DAM connector plugin for Drive, and we are doing some performance testing. While debugging I noticed some strange behavior. For example, when you start Drive, the HandlerFactorty is instantiated for about 7 times. The same strange behavior comes back in the OpenHandler. When I open a file (for example an InDesign file) from Bridge, the handler is called for about 5 times per file. And after every call the closehandler is also called. This makes 10 calls in total for just opening a file.


      Some other thing I noticed, is when you are browsing to a folder with for example 14 assets inside it, the GetAssetsHandler is called 14 times. I should expect that this handler is just called 1 time, and the 14 assest are injected through the GetAssetsRequest class. The same behavoir comes back with other handlers (MoveHandler, CopyHandler). There is also an inconsistency in this behavior (the DeleteHandler does get all the files at once through the DeleteRequest class).


      I also discoverd a difference between a move inside bridge and a move in explorer. When I move an item in bridge, the CopyHandler is called and the file is copied instead of moved. When I move an asset in explorer, the movehandler is called as expected.


      These issues are very concerning for me, because I have the feeling that they are effecting the performance of Bridge and Drive. Can you straighten out some of these issues? Maybe I'm missing something, or doing something wrong here?

        • 1. Re: Performance concers
          Lee Hui
          1. For " the HandlerFactorty is instantiated for about 7 times", could you tell me which version of Adobe Drive you use? If you use Adobe Drive 3.0,there will be 2 instances at most.
          2. For "the GetAssetsHandler is called 14 times", this is reasonable for the first time. Because GetAssetsHandler will be used to fetch thumbnail, asset modification date, and other asset info. If you always get 14 times call when you browse that folder, I think you need to check ETags in your connector implementataion when you fill recipes to handler response. Becasue ETag are used to update cache.
          3. Actually, there are indeed some differences between Bridge and Finder. But for you mentioned "When I move an item in bridge, the CopyHandler is called and the file is copied instead of moved", I guess that operation you did is moving an item in one project to another project.(We call folders under root as projects). If you move an item within project, you'll get MoveHandler invoked.
          4. For OpenHandler and CloseHandler, as this is invoked from Finder/Explorer which I mean it's called from Driver, we don't have  too much control for it. But, take performance into consideration, I suggest you cache the asset in your connector implementation so that OpenHandler and CloseHandler can execute quickly.  
          • 2. Re: Performance concers
            Nathanvdk Level 1

            1. I'm using Adobe Drive 3.0.070. In the mean while we've tested this on several developers machines (windows, not mac) and on the most of them it is instantiated more then 2 times

            2. Problem is, that we are calling a webservice for retriving our Assets, and it would be way more performant that we can make 1 call with 14 files instead of 14 calls with 1 file. Is there an alternitave available for this handler so that we can make 1 call to our service?

            3. Indeed, I was moving items between root classifications. When I move between folders underneath the root, it does actually move.

            4. We'll take a look at caching the assets in our connector.


            Thx for the advice.

            • 3. Re: Performance concers
              Nathanvdk Level 1

              Currently I'me investigating the Caching posibilities, more specific the cache state checking. I have implemented a Custom (dummy) statechecker, which is registered in the ConnectHandler (as explained in the Advanced topics in the Programmers guide). This checker always returns false.


              But when I debug my plugin, the isAssetStale is never triggered. Could you tell me when this function is normally triggered?

              • 4. Re: Performance concers
                Nathanvdk Level 1

                Update: the isAssetStale is triggered when I'me debugging with Explorer..., but never from Bridge

                • 5. Re: Performance concers
                  Nathanvdk Level 1

                  Could you explain me the use of ETags? Currently when a file modifies, I put a timestamp in it. Is this a correct usage?

                  • 6. Re: Performance concers
                    Lee Hui Level 2

                    When the file on the server is not modified, you should not change the ETags. For example, you check out a file, assuming that  the ETags value is 123456, then you edit that file, the ETags should still be 123456. After you check in that file, the ETags should be updated with new value which is greater than 123456.