zoukankan      html  css  js  c++  java
  • Allfeature.Item很慢

      VisitLog.LogMS "记录所有的FeatureKey"
      '遍历Allfeature记录
      For i = 1 To main.Map1.Layers.Item("观测站").AllFeatures.Count
         h1.Add main.Map1.DataSets.Item("观测站").Value(main.Map1.Layers.Item("观测站").AllFeatures(i).FeatureKey, "Name"), main.Map1.Layers.Item("观测站").AllFeatures(i).FeatureKey
      Next
      VisitLog.LogMS "完成记录所有的FeatureKey"


    结果

    46:27.158记录所有的FeatureKey

    46:57.767完成记录所有的FeatureKey


    总共才167个点。

    --------------------------------------------------------------------------
    改用for each

      Dim ftr As Feature
      For Each ftr In main.Map1.Layers.Item("¹Û²âÕ¾").AllFeatures
        h1.Add main.Map1.DataSets.Item("¹Û²âÕ¾").Value(ftr.FeatureKey, "Name"), ftr.FeatureKey

      Next

    结果:

    15:06.882记录所有的FeatureKey

    15:08.007完成记录所有的FeatureKey

    =================================================
    结论:
            mapx的allfeature的item索引是一个非常间接的处理,需要耗费大量的处理时间。

  • 相关阅读:
    面试汇总-待整理
    javaWeb2之Jsp
    Spring常用注解
    消费者、生产者模型
    网络知识之http请求
    设置Centos时间
    安装hive
    在Ubuntu上安装mysql(5.17.19)
    rabbitmq学习——主题路由
    rabbitmq学习——routingkey
  • 原文地址:https://www.cnblogs.com/jetz/p/1214931.html
Copyright © 2011-2022 走看看