Can BigText be 1000 time slower in Nav three tier

bjornebjorne Member Posts: 3
edited 2012-09-13 in NAV Three Tier
I'm working a lot with text in navison and now when working with Navison three tier in 2009 it is much slower than classic.
I made some test code. If i run it in classic it takes 1 ms and in three tier it takes 2000 ms
Could three tier really be that slow. Or have i missed some configurations.

tt := 0;
REPEAT
tt := tt +1;
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
bb.ADDTEXT('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
UNTIL tt>200;

Comments

  • deV.chdeV.ch Member Posts: 543
    Are you using 2009 R2? If so you could try using dotnet StringBuilder Class Maybe its more performant...

    And of course, have you tried your code after a "warmup" phase? There is always a cost of performance on a first run of newly created code, (at least from what i experienced).
  • bjornebjorne Member Posts: 3
    Thanks. I made a .NET COM wrapper that uses StringBuilder and now 3-tier was quicker than classic.
  • matteo_montanarimatteo_montanari Member Posts: 189
    Hi

    You can use directly stringbuilder without a com wrapper (But it work only on RTC, not Classic Client):

    New Variable:
    Name DataType Subtype Length
    StringBuilder DotNet 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Text.StringBuilder
    StringBuilder := StringBuilder.StringBuilder();
    tt := 0;
    REPEAT
      tt := tt +1;
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
      StringBuilder.Append('<name>testtesttesttesttesttesttesttesttesttesttesttesttest</name>');
    UNTIL tt>200;
    

    Bye

    Matteo
    Reno Sistemi Navision Developer
Sign In or Register to comment.