Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) imageMap performance and speed (Read 6384 times)
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
imageMap performance and speed
Oct 17th, 2012 at 3:27pm
Print Post  
Hi,

With imagemap I'm experiencing a bit of delay, especially when accessed via VPN over the internet.

I was experimenting with MaxImageSize but it seems to put these white lines as can be seen in the pic attached.

I'm setting it like this:
Code
Select All
<form id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <ndiag:DiagramView ID="diagramView" runat="server"
						Width="460px" Height="460px"
						ClientSideMode="ImageMap"
						Diagram-ShowGrid="true"
						DelKeyAction="DeleteSelectedItems"
                        ImageQuality="90"
                        MaxImageSize = "100, 100" >
                    </ndiag:DiagramView>
                    <cc1:InteractivityExtender ID="InteractivityExtender1" TargetControlID="diagramView" runat="server" />
                </ContentTemplate>
            </asp:UpdatePanel>
     </div>
 



Is there any other technique to maximize the performance of imagemap as far as speed and response time is concerned?

  

Capture_013.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: imageMap performance and speed
Reply #1 - Oct 18th, 2012 at 5:51am
Print Post  
Hi,

In what browser are you seeing these white stripes, and what's the size of diagram.Bounds?

MaxImageSize was added only to circumvent GDI's restriction in image size, because it throws an exception if images get larger than about 3000 x 3000 pixels. Setting a smaller MaxImageSize will actually lead to more data being transferred, since there is associated jpeg header data with each image, and compression will probably won't work that well on smaller images. I suppose you will get least bytes transferred when using a single image with lower ImageQuaity value.

You might also check if your VPN software offers some options for sending image/jpeg data unencrypted, in case that slows the image load times.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Re: imageMap performance and speed
Reply #2 - Oct 18th, 2012 at 10:42am
Print Post  
Diagram bounds:

Code
Select All
  // set diagram size
            int diagramHeight = 150;
            int diagramWidth = 150;
            diagram.Bounds = new System.Drawing.RectangleF(0, 0, diagramWidth, diagramHeight); 



It happened in firefox and IE9 and IE8.

Anyway however as you said it would be no use for my purpose which was to increase speed and as you rightly said (and I tested myself) it does indeed increase load time.

I might be wrong but I'm thinking along the lines of somehow caching the image.
  
Back to top
 
IP Logged
 
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Re: imageMap performance and speed
Reply #3 - Nov 5th, 2012 at 11:27pm
Print Post  
This reveals better results

Code
Select All
diagramView.ImageFormat = "image/png";
        diagramView.ImageQuality = 1; 



What I'd like to know is:

  • What MIME image types are supported?
    • Of these image type, which one would possibly load fastest?
      • Why is performance of PNG seemingly better than jpeg? This makes me think there might be another format thats even better than png and loads faster.
        • Imagequality seems to have little effect on png, why?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: imageMap performance and speed
Reply #4 - Nov 6th, 2012 at 9:05am
Print Post  
You can use the bitmap image formats listed at http://msdn.microsoft.com/en-us/library/bb882579.aspx. I suppose Jpeg requires more processing time for compression, but will create smaller image files, while Png is faster to compress and decompress but will require more bandwidth. Png uses lossless compression so it ignores the ImageQuality argument.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Re: imageMap performance and speed
Reply #5 - Nov 6th, 2012 at 8:06pm
Print Post  
So far PNG performs best.

Stoyo, give me some more ideas on how to reduce the postback flicker to such a low level that it's not noticable at all over internet.

I suppose in the end I could use javascript on some key events like nodemodified.

Point me to a tutorial for javascript using imagemap.
« Last Edit: Nov 6th, 2012 at 10:33pm by saad »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: imageMap performance and speed
Reply #6 - Nov 7th, 2012 at 7:58am
Print Post  
In ImageMap mode you can't handle NodeModified from JavaScript. I don't see how you can remove the delay when it has to generate large bitmaps on the server, compress them and transfer hundreds KB of data to the browser. Use Java or Canvas modes if smooth interaction is that important to you.
  
Back to top
 
IP Logged
 
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Re: imageMap performance and speed
Reply #7 - Nov 7th, 2012 at 5:37pm
Print Post  
  • Are these all the client events that can be handled by imagemap? LinkMouseEnter, NodeMouseEnter, LinkMouseLeave, NodeMouseLeave, LinkClicked, NodeClicked, LinkDoubleClicked, NodeDoubleClicked




  • Would there be a way to override source code to allow nodemodifed at client side?


  • Does imagemap javascript use same reference document as javaapplet?


  • Is there a way to stop postback on say nodemodifying or nodemodified?
« Last Edit: Nov 7th, 2012 at 6:38pm by saad »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: imageMap performance and speed
Reply #8 - Nov 8th, 2012 at 4:53pm
Print Post  
Quote:
Are these all the client events that can be handled by imagemap?


Yes.

Quote:
What about using PageMethods instead of updatepanel? Do you reckon that should increase performance?


I don't think it will help much, given post processing time is spent for creating the new image.

Quote:
Would there be a way to override source code to allow nodemodifed at client side?


No, the diagram image cannot be redrawn on the client side when you modify a node, so the postback is necessary. Of course you could add some JavaScript from server side to execute when the page is reloaded if you need to run JavaScript code in response, but there's no much point in that when you can handle the server event.

Quote:
Does imagemap javascript use same reference document as javaapplet?


No. All you can do from the ImageMap client event is access the item's ZIndex and Tag for identification purposes.

Quote:
Is there a way to stop postback on say nodemodifying or nodemodified?


You can probably stop post-back, but the image will still show the old node position while the DIV representing modification will remain at new position.
  
Back to top
 
IP Logged
 
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Re: imageMap performance and speed
Reply #9 - Nov 15th, 2012 at 3:45pm
Print Post  
I right clicked in iE and saved the diagram in png (as i was generating in png), and it appears to be only 27.7 kb!

Are you certain its the image thats the culprit for making it slow?

stoyo, do you got a working example of imagemap up on your site, or somewhere? maybe its our server?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: imageMap performance and speed
Reply #10 - Nov 16th, 2012 at 7:14am
Print Post  
Post-backs are slow in general and ImageMap mode won't get any faster. Apart from image size, consider the size of ASP.NET viewstate data sent along, and processing time on server to load the diagram, generate an image and save diagram back to viewstate.
  
Back to top
 
IP Logged
 
saad
Full Member
***
Offline


I Love MindFusion!

Posts: 117
Joined: Oct 8th, 2012
Re: imageMap performance and speed
Reply #11 - Nov 16th, 2012 at 6:58pm
Print Post  
This is normal response for it you mean?
Certain is fast on LAN.
  

Capture_030.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint