MapInfo Pro Developers User Group

 View Only
Expand all | Collapse all

Has the way tables and themes load in 19 changed from 17?

  • 1.  Has the way tables and themes load in 19 changed from 17?

    Posted 07-27-2020 21:53
    Edited by George Corea 07-27-2020 22:02
    I have an old 32bit code base that with some minor changes works in Mapinfo 17 and 19 -albeit in the legacy tab.  I have found that a set of tables/themes that load in about 17 seconds in v17 takes around 28 seconds in v19

    It is the exact same code and data compiled in v17 to run in both 17 and 19. I have also tried the same code compiled in 19. There's no timing difference between the options.

    The code is
    sub w_DSC_ExclAbandoned
    dim dt as datetime
    dt = CurDateTime()
    Print dt
    
    Open Table "G:\GIS_Tables\Vector_Data\Infrastructure\Water\Current\Derivative_Datasets\W_Mains_DSC_ExclAbandoned" As W_Mains_ExclAbnd Interactive
    Open Table "G:\GIS_Tables\Vector_Data\Infrastructure\Water\Current\Derivative_Datasets\W_Hydrants_DSC_ExclAbandoned" As W_Hydrants_ExclAbnd Interactive
    Open Table "G:\GIS_Tables\Vector_Data\Infrastructure\Water\Current\Derivative_Datasets\W_Nodes_NonValve_DSC_ExclAbandoned" As W_Nodes_NonValve_ExclAbnd Interactive
    Open Table "G:\GIS_Tables\Vector_Data\Infrastructure\Water\Current\Derivative_Datasets\W_Nodes_Valve_DSC_ExclAbandoned" As W_Nodes_Valve_ExclAbnd Interactive
    Open Table "G:\GIS_Tables\Vector_Data\Infrastructure\Water\Current\Derivative_Datasets\W_Meters_DSC_ExclAbandoned" As W_Meters_ExclAbnd Interactive
    Open Table "G:\GIS_Tables\Vector_Data\Infrastructure\Water\Current\Derivative_Datasets\W_Reservoirs_DSC_ExclAbandoned" As W_Reservoirs_ExclAbnd Interactive
    Open Table "G:\GIS_Tables\Vector_Data\Infrastructure\Water\Current\Point_of_Truth\Water_Service_Area_Boundaries" As W_Service_Area Interactive	
    Add Map Auto Layer W_Meters_ExclAbnd, W_Nodes_Valve_ExclAbnd, W_Hydrants_ExclAbnd, W_Reservoirs_ExclAbnd,W_Nodes_NonValve_ExclAbnd, W_Mains_ExclAbnd, W_Service_Area
    'Map from W_Nodes_NonValve_ExclAbnd, W_Nodes_Valve_ExclAbnd, W_Hydrants_ExclAbnd, W_Reservoirs_ExclAbnd, W_Meters_ExclAbnd, W_Mains_ExclAbnd
    
    'shade Water_Nodes with Type values  "90 Bend" Symbol (71,255,12,"Symbol",0,0)  , "90 Elbow" Symbol (71,255,12,"Symbol",1,90)  , "Unknown" Symbol (60,255,14,"MapInfo Water",256,117)  , "Air Release Valve" Symbol (43,255,8,"MapInfo Symbols",1,0)  , "Air Valve" Symbol (36,255,12)  , "Altitute Valve" Symbol (36,255,10,"MapInfo Symbols",1,160.7)  , "Borehole" Symbol (36,255,8,"MapInfo Symbols",1,121.4)  , "Butterfly Valve" Symbol (77,255,14,"MapInfo Water",257,168.1)  , "End Cap" Symbol (40,255,8,"MapInfo Symbols",1,0)  , "Ferrule Cock" Symbol (60,255,9,"MapInfo Symbols",288,167.1)  , "Flow Meter" Symbol (39,255,8,"MapInfo Symbols",1,0)  , "Gate Valve" Symbol (34,255,14,"MapInfo Water",257,0)  , "Hydraulic Contour Valve" Symbol (51,255,8,"MapInfo Symbols",1,0)  , "Intake" Symbol (53,255,8,"MapInfo Weather",0,0)  , "Junction" Symbol (35,255,4,"MapInfo Symbols",0,0)  , "Pressure Reducing Valve" Symbol (38,255,8,"MapInfo Symbols",0,0)  , "Pump" Symbol (60,255,8,"MapInfo Symbols",1,83.9)  , "Reducer" Symbol (43,255,8,"MapInfo Symbols",1,0)  , "Reflux Valve" Symbol (36,255,10,"MapInfo Symbols",1,75.4)  , "Scour Valve" Symbol (52,255,8,"MapInfo Symbols",1,0)  , "Sluice Valve" Symbol (51,255,8,"MapInfo Symbols",0,43.1)  , "Tower" Symbol (43,255,10,"MapInfo Miscellaneous",0,0)  , "WTP" Symbol (60,255,12,"MapInfo Real Estate",0,0)
    'shade W_Nodes_NonValve_Abnd with Type values  "Actuator Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"Air Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"Altitude Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"Borehole" Symbol (76,255,14,"MapInfo Water",0,0) ,"Butterfly Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"End Cap" Symbol (50,255,12,"MapInfo Water",1,0) ,"Ferrule Cock" Symbol (77,255,14,"MapInfo Water",257,168.1) ,"Intake" Symbol (120,255,12,"MapInfo Water",1,0), "Pressure Reducing Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"Pump" Symbol (60,255,14,"MapInfo Water",257,0) ,"Reducer" Symbol (38,255,10,"MapInfo Symbols",1,0) ,"Reflux Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"Scour Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"Sluice Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,"Stop Cock" Symbol (38,255,14,"MapInfo Water",1,0) ,"Tower" Symbol (58,255,12,"MapInfo Symbols",1,0) ,"Unknown" Symbol (36,255,12,"MapInfo Symbols",1,75.4) ,"WTP" Symbol (52,255,12,"MapInfo Symbols",1,0)
    
    Shade  W_Service_Area with Network values 
      "Daintree" Brush (2,16711680,16777215) Pen (1,2,16711680) ,
      "De Meio Drive" Brush (2,65280,16777215) Pen (1,2,65280) ,
      "Port Douglas, Mossman and Newell" Brush (2,255,16777215) Pen (1,2,255) ,
      "Whyanbeel" Brush (2,16711935,16777215) Pen (3,1,16711935) 
      default Brush (1,0,16777215) Pen (1,2,0)
     Set map
    	Layer prev
    	Alpha 50
    	display off
     set legend 
      layer prev
        display off 
        shades on 
        symbols off 
        lines off 
        count off 
        title "Water Service Area" Font ("Arial",1,8,0)
        subtitle auto Font ("Arial",0,8,0)
        order custom
        ranges Font ("Arial",0,8,0)
          range "Whyanbeel"  auto display on ,
          range "Port Douglas, Mossman and Newell" auto display on ,
          range "De Meio Drive"  auto display on ,
          range "Daintree"  auto display on ,
          range default  auto display off 
    	     
    Shade W_Nodes_NonValve_ExclAbnd with Status values 
     ' "Abandoned" Line (5,36,16711935) ,
     "Active" Line (4,1,255) Symbol (40,255,1,"MapInfo Cartographic",0,0) ,
     "Inactive" Line (5,15,16744448)
     ' "Never Existed" Brush (2,16776960,16777215) Pen (1,2,0) Line (1,2,16776960) Symbol (34,16776960,12) ,
     ' "Planned" Line (5,2,8388736) 
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 1) Units "km" 
    	  Layer W_Nodes_NonValve_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 1000) Units "m" 
          Activate 
           Using "https://infoxpert.edrms/docs/~D"+As_con_InfoXpert_ID Alias "InfoXpert primary link: " On Labels Objects Relative Path Off,
           Using "https://infoxpert.edrms/docs/~D"+CWCF_hyperlink Alias "Additional Details docs: " On Labels Objects Relative Path Off,
           Using "http://man01.douglas.council/tickets/v2#open_tickets/"+Spiceworks_ID Alias "Spiceworks: "+Spiceworks_ID On Labels Objects Relative Path Off
           
    	set legend 
    	  layer prev 
    	    display off 
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "Water Point Status" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	      auto display off,
    	      auto display on,
    	      auto display off
    	      
    shade W_Nodes_NonValve_ExclAbnd with Type values
      "Actuator Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Air Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Altitude Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Borehole" Symbol (76,255,14,"MapInfo Water",0,0) ,
      "Butterfly Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "End Cap" Symbol (50,255,12,"MapInfo Water",1,0) ,
      "Ferrule Cock" Symbol (77,255,14,"MapInfo Water",257,0) ,
      "Intake" Symbol (120,255,12,"MapInfo Water",1,0) ,
      "Junction" Symbol (140,255,1,"MapInfo Water",0,0) ,
      "Pressure Reducing Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Pump" Symbol (60,255,14,"MapInfo Water",257,0) ,
      "Reducer" Symbol (38,255,10,"MapInfo Symbols",1,0) ,
      "Reflux Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Scour Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Sluice Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Stop Cock" Symbol (38,255,14,"MapInfo Water",1,0) ,
      "Tower" Symbol (58,255,12,"MapInfo Symbols",1,0) ,
      "Unknown" Symbol (36,255,12,"MapInfo Symbols",1,75.4) ,
      "WTP" Symbol (52,255,12,"MapInfo Symbols",1,0) 
      'default   # color 1 # 
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 12) Units "km" 
    	  Layer W_Nodes_NonValve_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 2000) Units "m" 
    	    Label Line Arrow Position Right Font ("Arial",261,7,255,16777215) Pen (1,2,0) 
    	      With Open_Closed
    	      Parallel On Auto Off Overlap Off Duplicates On Offset 2
    	      Visibility Zoom (0, 1000) Units "m"
          Activate 
           Using "https://infoxpert.edrms/docs/~D"+As_con_InfoXpert_ID Alias "InfoXpert primary link: " On Labels Objects Relative Path Off,
           Using "https://infoxpert.edrms/docs/~D"+CWCF_hyperlink Alias "Additional Details docs: " On Labels Objects Relative Path Off,
           Using "http://man01.douglas.council/tickets/v2#open_tickets/"+Spiceworks_ID Alias "Spiceworks: "+Spiceworks_ID On Labels Objects Relative Path Off	      
    	set legend 
    	  layer prev 
    	    display on 
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "Water Network" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    auto display off ,"Valve" display off ,auto display off ,auto display off ,auto display on ,auto display off ,auto display on ,auto display on ,auto display on ,auto display on ,auto display off ,auto display on ,auto display on ,auto display off ,auto display off ,auto display on ,auto display on ,auto display on ,auto display on ,auto display on   
    
    Shade W_Nodes_Valve_ExclAbnd with Status values 
     ' "Abandoned" Line (5,36,16711935) ,
     "Active" Line (4,1,255) Symbol (40,255,1,"MapInfo Cartographic",0,0) ,
      "Inactive" Line (5,15,16744448)
     ' "Never Existed" Brush (2,16776960,16777215) Pen (1,2,0) Line (1,2,16776960) Symbol (34,16776960,12) ,
     ' "Planned" Line (5,2,8388736) 
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 1) Units "km" 
    	  Layer W_Nodes_Valve_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 1000) Units "m" 
          Activate 
           Using "https://infoxpert.edrms/docs/~D"+As_con_InfoXpert_ID Alias "InfoXpert primary link: " On Labels Objects Relative Path Off,
           Using "https://infoxpert.edrms/docs/~D"+CWCF_hyperlink Alias "Additional Details docs: " On Labels Objects Relative Path Off,
           Using "http://man01.douglas.council/tickets/v2#open_tickets/"+Spiceworks_ID Alias "Spiceworks: "+Spiceworks_ID On Labels Objects Relative Path Off
    	set legend 
    	  layer prev 
    	    display off 
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "Water Point Status" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	      auto display off,
    	      auto display on,
    	      auto display off
    	      
    shade W_Nodes_Valve_ExclAbnd with Type values
      "Actuator Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Air Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Altitude Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Borehole" Symbol (76,255,14,"MapInfo Water",0,0) ,
      "Butterfly Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "End Cap" Symbol (50,255,12,"MapInfo Water",1,0) ,
      "Ferrule Cock" Symbol (77,255,14,"MapInfo Water",257,0) ,
      "Intake" Symbol (120,255,12,"MapInfo Water",1,0) ,
      "Junction" Symbol (140,255,1,"MapInfo Water",0,0) ,
      "Pressure Reducing Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Pump" Symbol (60,255,14,"MapInfo Water",257,0) ,
      "Reducer" Symbol (38,255,10,"MapInfo Symbols",1,0) ,
      "Reflux Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Scour Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Sluice Valve" Symbol (118,255,14,"MapInfo Water",0,0) ,
      "Stop Cock" Symbol (38,255,14,"MapInfo Water",1,0) ,
      "Tower" Symbol (58,255,12,"MapInfo Symbols",1,0) ,
      "Unknown" Symbol (36,255,12,"MapInfo Symbols",1,75.4) ,
      "WTP" Symbol (52,255,12,"MapInfo Symbols",1,0) 
      'default   # color 1 # 
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 12) Units "km" 
    	  Layer W_Nodes_Valve_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 2000) Units "m" 
    	    Label Line Arrow Position Right Font ("Arial",261,7,255,16777215) Pen (1,2,0) 
    	      With Open_Closed
    	      Parallel On Auto Off Overlap Off Duplicates On Offset 2
    	      Visibility Zoom (0, 1000) Units "m"
    	      
    	set legend 
    	  layer prev 
    	    display off 
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "Water Network" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    auto display off ,"Valve" display off ,auto display off ,auto display off ,auto display on ,auto display off ,auto display on ,auto display on ,auto display on ,auto display on ,auto display off ,auto display on ,auto display on ,auto display off ,auto display off ,auto display on ,auto display on ,auto display on ,auto display on ,auto display on   
    
    
    
    Shade W_Reservoirs_ExclAbnd with Status values 
     ' "Abandoned" Line (5,36,16711935) ,
     "Active" Line (4,1,255) Symbol (40,255,1,"MapInfo Cartographic",0,0) ,
      "Inactive" Line (5,15,16744448)
     ' "Never Existed" Brush (2,16776960,16777215) Pen (1,2,0) Line (1,2,16776960) Symbol (34,16776960,12) ,
     ' "Planned" Line (5,2,8388736) 
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 1) Units "km" 
    	  Layer W_Hydrants_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 1000) Units "m" 
    	set legend 
    	  layer prev 
    	    display off 
    	    shades off 
    	    symbols off 
    	    lines on 
    	    count off 
    	    title "" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
          auto display off,
          auto display on
    
    Shade W_Reservoirs_ExclAbnd with Type values "RESERVOIR" Symbol (42,255,15,"MapInfo Water",256,0) default Symbol (40,0,12)  
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 12) Units "km" 
    	  Layer W_Reservoirs_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 2000) Units "m" 
          Activate 
           Using "https://infoxpert.edrms/docs/~D"+As_con_InfoXpert_ID Alias "InfoXpert primary link: " On Labels Objects Relative Path Off,
           Using "https://infoxpert.edrms/docs/~D"+CWCF_hyperlink Alias "Additional Details docs: " On Labels Objects Relative Path Off,
           Using "http://man01.douglas.council/tickets/v2#open_tickets/"+Spiceworks_ID Alias "Spiceworks: "+Spiceworks_ID On Labels Objects Relative Path Off
    	      
    	set legend 
    	  layer prev 
    	    display on 
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "" Font ("Arial",0,9,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	      auto display off,
    	      "Reservoir" display on
    	      
    	   
    
    
    Shade W_Hydrants_ExclAbnd with Status values 
     ' "Abandoned" Line (5,36,16711935) ,
     "Active" Line (4,1,255) Symbol (40,255,1,"MapInfo Cartographic",0,0) ,
      "Inactive" Line (5,15,16744448)
     ' "Never Existed" Brush (2,16776960,16777215) Pen (1,2,0) Line (1,2,16776960) Symbol (34,16776960,12) ,
     ' "Planned" Line (5,2,8388736) 
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 1) Units "km" 
    	  Layer W_Hydrants_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 1000) Units "m" 
    	set legend 
    	  layer prev 
    	    display off 
    	    shades off 
    	    symbols off 
    	    lines on 
    	    count off 
    	    title "" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
          auto display off,
          auto display on
    		  
    shade W_Hydrants_ExclAbnd with Name values "Hydrant" Symbol (35,255,10,"MapInfo Symbols",256,0) default Symbol (34,255,8)
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 12) Units "km" 
    	  Layer W_Hydrants_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 2000) Units "m" 
    	    Label Line Arrow Position Right Font ("Arial",0,8,0) Pen (1,2,0) 
    	      With Size
    	      Parallel On Auto Off Overlap Off Duplicates On Offset 2
    	      Visibility Zoom (0, 1000) Units "m"
          Activate 
           Using "https://infoxpert.edrms/docs/~D"+As_con_InfoXpert_ID Alias "InfoXpert primary link: " On Labels Objects Relative Path Off,
           Using "https://infoxpert.edrms/docs/~D"+CWCF_hyperlink Alias "Additional Details docs: " On Labels Objects Relative Path Off,
           Using "http://man01.douglas.council/tickets/v2#open_tickets/"+Spiceworks_ID Alias "Spiceworks: "+Spiceworks_ID On Labels Objects Relative Path Off	      
    	set legend 
    	  layer prev 
    	    display on
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "" Font ("Arial",0,9,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	      auto display off,
    	      "Hydrant" display on
    	      
    	
    
    shade W_Mains_ExclAbnd with Status values 
     ' "Abandoned" Line (5,36,16711935) ,
     '"Active" Line (4,1,16711935) ,
      "Inactive" Line (5,2,16744448)
     ' "Never Existed" Brush (2,16776960,16777215) Pen (1,2,0) Line (1,2,16776960) Symbol (34,16776960,12) ,
     ' "Proposed" Line (5,2,8388736) 
    
    	Set Map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 12) Units "km" 
    	  Layer W_Mains_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 2.5) Units "km" 
    	    
    	set legend 
    	  layer prev 
    	    display on 
    	    shades off 
    	    symbols off 
    	    lines on 
    	    count off 
    	    title "Water Mains Status" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	      auto display off,
    		  auto display on
    
    	      
    	      
    'shade Water_Mains with Pipe_Type values "Trunk" Line (3,2,255), "Reticulation" Line (1,2,255), "" Line (1,4,255) default Line (1,1,255) 
    shade W_Mains_ExclAbnd with Pipe_diameter ranges apply all use all Line (15,2,255)  0: 50 Line (15,2,255) ,50: 150 Line (22,2,255) ,150: 300 Line (32,2,255) ,300: 800 Line (38,2,255) default Line (1,2,16777215)
    
    	Set Map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 12) Units "km" 
    	  Layer W_Mains_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 2.5) Units "km" 
    	    Label Line None Position Above Font ("Arial",261,7,255,16777215) Pen (1,2,0) 
    	      With Pipe_Diameter+"Ø  "+Pipe_Material+" "+Install_Year
    	      Parallel On Auto On Overlap Off Duplicates On Offset 2
    	      Visibility Zoom (0, 1) Units "km"
          Activate 
           Using "https://infoxpert.edrms/docs/~D"+As_con_InfoXpert_ID Alias "InfoXpert primary link: " On Labels Objects Relative Path Off,
           Using "https://infoxpert.edrms/docs/~D"+CWCF_hyperlink Alias "Additional Details docs: " On Labels Objects Relative Path Off,
           Using "http://man01.douglas.council/tickets/v2#open_tickets/"+Spiceworks_ID Alias "Spiceworks: "+Spiceworks_ID On Labels Objects Relative Path Off	      
    	set legend 
    	  layer prev 
    	    display on 
    	    shades off 
    	    symbols off 
    	    lines on 
    	    count off 
    	    title "Water Mains" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	  auto display off ,
          "0 to 49" display on ,
          "50 to 149" display on ,
          "150 to 299" display on ,
          "300 up" display on 
    
    	      
    Shade W_Meters_ExclAbnd with Status values
     ' "Abandoned" Line (5,36,16711935) ,
     "Active" Line (4,1,255) Symbol (40,255,1,"MapInfo Cartographic",0,0) ,
      "Inactive" Line (10,2,16744448)
     ' "Never Existed" Brush (2,16776960,16777215) Pen (1,2,0) Line (1,2,16776960) Symbol (34,16776960,12) ,
     ' "Planned" Line (5,2,8388736) 
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 1) Units "km" 
    	  Layer W_Meters_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 1000) Units "m" 
    	Set legend
    	  layer prev 
    	    display on 
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "Water Point Status" Font ("Arial",1,8,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	      auto display off,
    	      auto display off,
    	      auto display on	
          
    shade W_Meters_ExclAbnd with Type values  "District" Symbol (32,255,12)  , "Flow Meter" Symbol (32,5308415,12)  , "Meter" Symbol (38,255,12)  , "Service" Symbol (38,2555,12), "Unknown" Symbol (35,255,12)
    	Set map
    	  Layer prev
    	    Display Value
    	    Global Pen (1,2,0)  Brush (2,16777215,16777215)  Symbol (35,0,12)  Line (1,2,0)  Font ("Arial",0,9,0)
    	    Selectable Off
    	    Zoom (0, 12) Units "km" 
    	  Layer W_Meters_ExclAbnd
    	    Display Graphic
    	    Global Pen (1,2,0) Brush (2,16777215,16777215) Symbol (35,0,12) Line (1,2,0) Font ("Arial",0,9,0)
    	    Zoom (0, 2000) Units "m" 
    	    Label with Open_Closed Position Right Font ("Arial",261,7,255,16777215) Pen (1,2,0)
    	      With Size
    	      Parallel On Auto Off Overlap Off Duplicates On Offset 2
    	      Visibility Zoom (0, 1000) Units "m"
          Activate 
           Using "https://infoxpert.edrms/docs/~D"+As_con_InfoXpert_ID Alias "InfoXpert primary link: " On Labels Objects Relative Path Off,
           Using "https://infoxpert.edrms/docs/~D"+CWCF_hyperlink Alias "Additional Details docs: " On Labels Objects Relative Path Off,
           Using "http://man01.douglas.council/tickets/v2#open_tickets/"+Spiceworks_ID Alias "Spiceworks: "+Spiceworks_ID On Labels Objects Relative Path Off	      
    	set legend 
    	  layer prev 
    	    display on
    	    shades off 
    	    symbols on 
    	    lines off 
    	    count off 
    	    title "" Font ("Arial",0,9,0)
    	    subtitle auto Font ("Arial",0,8,0)
    	    ascending on 
    	    ranges Font ("Arial",0,8,0)
    	      auto display off,
    	      "District Meters" display on,
    	      "Flow Meter" display off,
    	      "Meter" display off,
    	      "Service Meters" display on
    	      
    
    dt = CurDateTime()
    Print dt
    
    
       
    Alter menu item w_DSC_ExclAbandoned disable
    Alter menu item w_DSC_ExclAbandoned_close enable
    
    end sub

    I understand it loads 2 or more themes on some data and this can be reduced but it still doesn't change why 17 takes significantly a lot less time than 19.

    	Start	                End	            Duration
    v19	20200728113949370	20200728114009627	60300
    v17	20200728114154594	20200728114204107	49600​

    This is just  CurDateTime() difference. the 17 to 28s difference was looking at it visually with a stopwatch.



    ------------------------------
    George Corea
    Mangoesmapping
    ------------------------------


  • 2.  RE: Has the way tables and themes load in 19 changed from 17?

    Employee
    Posted 08-10-2020 19:46
    Hi George,

    Have you tried hiding the explorer and or table list windows?
    Another idea is to start Pro without any addins via /noautoload command line option.

    If this helps, we also have several ways to stop propagating events we can explore.

    -Bob

    ------------------------------
    Bob Fortin
    Software Architect and Distinguished Engineer
    MapInfo Pro Development Team
    ------------------------------



  • 3.  RE: Has the way tables and themes load in 19 changed from 17?

    Employee
    Posted 08-11-2020 04:24
    One thing to notice is that we since MapInfo Pro v17.0 was released are adding the bins from the themes into the Layer List.

    This could explain why it takes a bit longer. I'm not sure if it explains the total extra time.

    ------------------------------
    Peter Horsbøll Møller
    Distinguished Engineer
    Pitney Bowes Software & Data
    ------------------------------



  • 4.  RE: Has the way tables and themes load in 19 changed from 17?

    Posted 08-13-2020 03:16
    Hi,

    I'm also very sure, that something major must have changed internally since the last release.
    I'm maintaining a customer application that automatizes MiPro via COM, and since this is possible (v17.03) working with the 64-Bit version was allways at least 20% faster then running it with the 32-Bit version (15.03).
    Since 2019.2 ( might also be the same for 2019/2019.1 cannot say right now) the 32-Bit version is now much faster again, - it's the same code for both.
    The application runs with 64-Bit MiPro, much slower but without obvious error messages.

    Something must have changed?!

    cheers
    SH


  • 5.  RE: Has the way tables and themes load in 19 changed from 17?

    Employee
    Posted 08-13-2020 04:22
    Hi Stefan,

    I just want to make sure I get this right:
    - Running your tool in Pro v17.0.3 was 20% faster than running your tool in 32-bit
    - But running your tool in Pro v2019.2 is now (much) slower than running your tool in 32-bit

    Have I understood this correctly? If yes, I'd say there's something "broken".

    Is your tool opening and displaying data on a map, and if I remember correctly, exporting the result to an image?
    Does it use SQL heavily?

    Thanks

    ------------------------------
    Peter Horsbøll Møller
    Distinguished Engineer
    Pitney Bowes Software & Data
    ------------------------------



  • 6.  RE: Has the way tables and themes load in 19 changed from 17?

    Posted 08-13-2020 04:31
    Hi Peter,

    you got it all right.
    It's an VBA-Application running in MS-Access and using MiPro in the background:
    - to fetch (a lot of) data from an ORACLE-Db, including some OracleSpatial-Statements that get passed through via an MB-Application
    - to register and use some other MS-Access databases
    - to create some new MiPro-Tables that bring all the other results together
    so there is heavy HD- and Network-I/O.
    Communication between the MapBasic-Program, MiPro and MS-Access is done via DDE.
    No layouting, no map drawing, - MiPro is only visible in TaskManager all the time.

    And as i said, the program does run, - but significantely slower.

    Thanks for looking into this
    and
    regards

    Stefan


  • 7.  RE: Has the way tables and themes load in 19 changed from 17?

    Posted 08-16-2020 06:29
      |   view attached
    Hi Peter,

    just had the time to do some benchmarking and logged the time the MapInfo-Part of my application takes
    (several runs, not just one)

    1. Computer (Win 10 Pro DE 1909 / MS Access DB Engine 2010 64-Bit / Office 2016 / Oracle 19c client)

    - running the application with 32-Bit MiPro (15.03) it's about 2 Minutes and 20 secs
    - running the application with 64-Bit MiPro (2019.2) it's about 5 Minutes and 40 secs

    2. Computer (Win 10 Pro DE 2004 / MS Access DB Engine 2010 64-Bit / Office 2019 / Oracle 19c client)

    - running the application with 32-Bit MiPro (15.03) it's about 2 Minutes and 6 secs
    - running the application with 64-Bit MiPro (2019.2) it's about 4 Minutes and 30 secs

    3. Computer (Win 10 Pro DE 2004 / MS Access DB Engine 2016 64-Bit / Office 2019 / Oracle 19c client)

    - running the application with 32-Bit MiPro (15.03) it's about 1 Minute and 46 secs
    - running the application with 64-Bit MiPro (2019.2) it's about 4 Minutes and 39 secs

    so it's +/- 2,5 times slower.

    with MiPro 17 the processing was 20% faster as with 32-Bit MiPro, i meassured that often when i had it installed.

    Attached you see the log of just one run, and the slowest part, with the biggest difference.
    The mapbasic routine called in that part of the program does a simple aggregation of a native MiPro-Tab into a newly generated native MiPro-Tab file and adds some column values from some MS-Access based MiPro-Tab-Files, - no oracle connection, - no geometric processing just column updates and table joins.

    Would be great to have 64Bit MiPro running again faster as the antique 32Bit one.

    regards
    Stefan


  • 8.  RE: Has the way tables and themes load in 19 changed from 17?

    Posted 08-17-2020 02:53
    Hi there,

    it seems that MiPro 2019.2 has a problem with index handling.

    Monitored the processes of 15 and 2019.2 and saw, that 2019.2 mainly reads the .DAT file of the input table without any access to the .IND file. So it reads 4-5 minutes up and down that file again and again, while MiPro 15 just reads the .DAT- and .IND-File once and starts the process.
    So it looks, as if the index isn't used by 2019.2 at all.

    Tested this now with a 120 MB mappable Table doing a "combine objects using column" operation, and it showed exactly the same behaviour: MiPro 15 finishes that job in about 4 minutes, while MiPro 2019.2 works something of 30 minutes on that tasks and then just finishes it silently in the background with no result...

    Would be great to get that fixed.

    cheers
    Stefan


  • 9.  RE: Has the way tables and themes load in 19 changed from 17?

    Posted 08-18-2020 22:58
    Thanks Stefan, Peter and Bob.

    I've just been running some quick tests and notice that there are differences between Mapinfo (v15 and 19) loading data via a WOR and them loading the data via an MBX.

    I see the following

    2-4 Are my initial tests with council data. 5-8 are using the StreetPro (AUS_NSW_CLASSIC_022020) demo data from https://data.precisely.com/samples and the supplied nsw_streetpro.wor

    All I did for the Wor file is add a print of the datetime.
    !Workspace
    !Version 1500
    !Charset WindowsLatin1
    dim dt as datetime
    dt = CurDateTime()
    Print "Started at: "&dt
    Open Table "ocean" As ocean Interactive
    ...
    Set Window FrontWindow() Title "StreetPro New South Wales Edition 2020_02"
    dt = CurDateTime()
    Print "Ended at: "&dt​

    and for the Mapbasic
    Include "MapBasic.def"
    Include "Menu.def"
    
    Declare Sub Main()
    
    Sub Main()
    dim dt as datetime
    dt = CurDateTime()
    Print "Started at: "&dt
    Open Table "D:\Test\MB_Speed\Australia\nsw\ocean" As ocean Interactive
    
    ...
    
    Set Window FrontWindow() Title "StreetPro New South Wales Edition 2020_02"
    dt = CurDateTime()
    Print "Ended at: "&dt
    
    
    End Sub​

    I also set the file paths.

    This shows clearly that

    1. Data loads QUICKER in MI 19 to MI 15 iff loaded from a WOR file
    2. Data loads much SLOWER in MI 19 to MI 15 iff loaded from an MBX file

    Additionally if I open the same mb compiled using Mapbasic v15 32bit in MI 19, the run time is 3.22s rather than 7.14 (when compiled in 64bit).

    For the tests Mapinfo was open with no data loaded and the wor/mbx files were simply dragged in.
    Versions are
    and
    and 

    So to repeat my initial question - Should the way data is loaded in Mapbasic be different to what we see in a WOR to make it not slower to load in 64bit (v19) than 32bit? I didn't test this in v17.

    ------------------------------
    George Corea
    Mangoesmapping
    ------------------------------

    Attachment(s)

    txt
    nsw_streetpro.wor.txt   38 KB 1 version
    txt
    SpeedTest.mb.txt   39 KB 1 version


  • 10.  RE: Has the way tables and themes load in 19 changed from 17?

    Employee
    Posted 08-21-2020 09:24
    Hi George

    The short answer is yes, there is a difference in loading a workspace as statements in a workspace or as statements in a compiled Mapbasic application.

    We handle the loading of a workspace differently which also will result in the delay of the rendering of elements on the screen.

    I tried something similar to your example and noticed that MapInfo Pro v2019 was around 1.5 to 4 times as first at loading a pure workspace compared to running the statements from the workspace in a compiled MapBasic application. The difference in times was mainly with the compiled MapBasic application where the loading of the workspace was steady and mostly took the same time.

    I was that scientific about my test so I had other applications running and I didn't close down MapInfo Pro after each test. This might also explain some of the differences.

    One suggestion I'd make is to run your application from you compiled MapBasic application instead of incorporating the statements directly into the applications:
    Run Command "Run Application " & Chr$(34) & sPath & "StreetPro.wor" & Chr$(34)

    This also makes your application more flexible as you can reconfigure your workspace without having to recompile your application. And the loading time of the workspace will be similar to loading the workspace directly into MapInfo Pro

    ------------------------------
    Peter Horsbøll Møller
    Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 11.  RE: Has the way tables and themes load in 19 changed from 17?

    Posted 08-24-2020 06:48
    Edited by George Corea 08-24-2020 16:52
    Hi Peter,

    Thanks for the feedback. As per my original post the actual process I noticed the difference in is loading data and themes using mapbasic and not 'wor' files. The test using the wor based code was just to show that there is a difference in the load times with publically available data and themes as I didn't have the time to code the mapbasic from scratch.

    Sorry for this confusion. The comment about the difference in wor to mbx timing was just as I noticed it -the key point was the difference in processing an mbx in 32bit and v19.

    The key question remains -should the code that loads a table and theme in mapbasic 32bit be changed at all to work more efficiently (or at least equally as efficiently) in v19 64bit, keeping in mind that it is almost the same in v15, 32bit and v17bit but slower in v19.


    Regards,


    ------------------------------
    George Corea
    Mangoesmapping
    ------------------------------