[mapguide-internals] Autodesk.MapGuide.Studio.Site.LayerInfo.Save

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Thu Nov 27 15:35:26 EST 2008


So it is actually a problem with a pure .Net solution?
I have not seen this reported for .Net ever before.
I will try out your setup, but it will be a while before I get around to it.

I can see that the MgLocalizor is implented in .Net so it makes sense 
that is gets slow,
if there is a problem with IndexOf on certain locale settings.
The AJAX viewer is also implented in .Net so that would also happen.

But I cannot see how any of this would affect Maestro, unless you are 
trying to
set a locale on the Maestro application itself.

It usually takes less than a second for me to save a layer.

Regards, Kenneth Skovhede, GEOGRAF A/S



ljv skrev:
> Ohh, everything was slow.
>
> I have isolated the cause of the problem.
>
> culture="se-SE" causes ALL string operations to become utterly slow. This is
> easy to test, add
>
>  <globalization
>       culture="se-SE"
>      />
>
> to webconfig for viewer and servers..
>
>
> I'm unsure where (maestro, server, viewcode) uses the string functions. I
> know that the MgLocalizer.Localize is heavily affected due to the string
> functions that is used.
>
> I have verified that dot-net behave in this maner, to following code is runs
> at 10sec at se-SE and close to 0 sec at "sv-SE".
>
>
>         Dim SoSlow As String = ""
>        
> Response.Write(System.Globalization.CultureInfo.CurrentCulture.EnglishName &
> "<br>")
>         Response.Write(Now & "<br>")
>         For lFiller As Long = 1 To 10 * 1000
>             SoSlow = SoSlow & Chr(Rnd() * 24 + 65)
>         Next
>         Response.Write(Now & "<br>")
>         For lSearcher As Long = 1 To 10
>             If SoSlow.IndexOf(Chr(Rnd() * 24 + 65) & Chr(Rnd() * 24 + 65)) >
> 0 Then
>                 Response.Write("+")
>             Else
>                 Response.Write("->")
>             End If
>         Next
>         Response.Write(Now & "<br>")
>
> Since I do not plan to use culture "se-SE" this is no longer a real problem
> for me, but  mastero, mapserver and viewer is heavily affected by culture
> settings. 
>
> Saving layerinfo still takes a few seconds for 2k of data. Is that normal?
>
>
>
>
> Kenneth Skovhede, GEOGRAF A/S wrote:
>   
>> I still cannot guess where exactly the problem occurs.
>> Is it when you load the page?
>> Is it when you save a layout from Maestro?
>> Is it when you create a temp layout in custom .Net code?
>> Is it in the viewer code?
>> Is it in a sample application?
>>
>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>
>>
>>
>> ljv skrev:
>>     
>>> Thx, i will check with em.
>>>
>>> But the server has the same problem, without the culture set (as default)
>>> all text search and replace takes very long time (used when parsing
>>> layouts).  To use the map without setting culture is impossible. The
>>> problem
>>> is in the dotnet code.  If a create an  empty web  app that search and
>>> replaces text in the same manner as the mapserver the  response is also
>>> slow.  It's around 1000 times slower than if you set the culture.  
>>>
>>>
>>>
>>> ljv wrote:
>>>   
>>>       
>>>> I find this (Autodesk.MapGuide.Studio.Site.LayerInfo.Save) functions
>>>> slow,
>>>> 2-4 seconds to save 2kb. 
>>>>
>>>> There is no problem with server or network, most functions are fast.
>>>>
>>>>  Except for this: In web.config globalization Culture="xxxx" must be
>>>> set.
>>>> Unless the culture is explicite set all strings functions like search
>>>> become so slow that the application is useless. Both maestro and
>>>> mapstudio
>>>> benefit from adding culture to web.config. we have used our
>>>> culture="sv-SE" and English variants and setting the culture speeds the
>>>> viewer and application.
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>>
>>     
>
>   


More information about the mapguide-internals mailing list