[mapguide-internals] Autodesk.MapGuide.Studio.Site.LayerInfo.Save
ljv
johan.vikstrom at gmail.com
Tue Nov 25 03:45:05 EST 2008
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
>
>
--
View this message in context: http://www.nabble.com/Autodesk.MapGuide.Studio.Site.LayerInfo.Save-tp20317706p20677144.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.
More information about the mapguide-internals
mailing list