Inside MSXML Performance(MSXML性能分析) (3)

专利XML转档核稿系统技术拆解:8 项形式检查如何前置 专利XML转档的选型重点,是看转档与核稿能否在同一份源文档上完成,并把形式问题挡在递交之前。先用 3–5 份真实案卷小批量试跑,重点看公式、附图编号与术语一致性,而不是只看单次耗时。按真实案卷核算月均转档量,再对照按量、按年两种计费模式做成本比较,不依赖单一口径。把核稿结果当作形式审查清单,实质判断仍由撰写人完成;涉及敏感数据的团队优先评估本地部署版。你现在用哪套工具做专利XML转档?评论区说说经常遇到的格式问题,我们按场景整理一份检查清单。 阅读详情

MSXML Features

MSXML特点

Next, let's examine some important scenarios associated with the Document Object Model (DOM)—including loading, saving, walking a DOM tree, and creating a new DOM tree in memory.

接下去,让我们讨论一些在文档对象模型(DOM)中很重要的场景,包括载入,保存,遍历DOM树和在内存中创建一个新的DOM树。

DOM

The MSXML Document Object Model ("Microsoft.XMLDOM," CLSID_DOMDocument, IID_IXMLDOMDocument) is the starting point for all XML processing within the MSXML parser. The fastest way to load an XML document is to use the default "rental" threading model (which means the DOM document can be used by only one thread at a time; it doesn't matter which thread) with validateOnParse, resolveExternals, and preserveWhiteSpace all disabled:

MSXML文档对象模型("Microsoft.XMLDOM," CLSID_DOMDocument, IID_IXMLDOMDocument)是MSXML解析器中所有处理XML过程的起始点。载入一个XML文档的最快的方法是使用默认的“租用”线程模式(这意味着该DOM文档同时只有一个线程能使用;但它并不介意是哪一个线程使用),必须将validateOnParse, resolveExternals和 preserveWhiteSpace的属性设为False:

    var doc = new ActiveXObject("Microsoft.XMLDOM");

    doc.validateOnParse = false;

    doc.resolveExternals = false;

    doc.preserveWhiteSpace = false;

    doc.load("test.xml");

Working Set

工作集

When using the DOM, the first metric to consider is the working set. Memory is used to load Msxml.dll and the other .dll files on which it depends. Some of these other .dll files are "delay loaded," which means the working set won't be affected until that .dll is used. MSXML is a COM DLL, so you typically use the standard COM APIs (CoInitialize and CoCreateInstance) to create a new XML document object. The minimum working set for a simple Visual C++ 6.0 command line application that uses COM is about one megabyte. (This includes the following .dll files: Ntdll.dll, Kernel32.dll, Ole32.dll, Rpcrt4.dll, Advapi32.dll, Gdi.dll, User32.dll, and Oleaut32.dll.) The first call to CoCreateInstance of an IXMLDOMDocument object loads Msxml.dll and Shlwapi.dll, which adds another 745 KB on top of this. Once all the .dll files are loaded, a new IXMLDOMDocument object is only about 8 KB.

当使用DOM时,首先要考虑的度量指标是工作集。内存中载入了Msxml.dll和其他必须的dll文件。这些dll文件中有的是延时载入的,就是说它们在没有使用之前并不影响工作集。MSXML是一个COM DLL,所以你通常使用标准COM API(CoInitialize 和CoCreateInstance)来创建一个新的XML文档对象。对于一个简单的使用COM的Visual C++6.0命令行应用程序最少的工作集是1兆字节左右。(这包含了以下dll文件:Ntdll.dll,Kernel32.dll,Ole32.dll,Rpcrt4.dll,Advapi32.dll,Gdi.dll,User32.dll和Oleaut32.dll。)首次调用CoCreateInstance创建IXMLDOMDocument对象时载入Msxml.dll和Shlwaip.dll,在前面的基础上又增加了745KB。一旦所有的dll文件载入后,新建的IXMLDocument对象只需要8KB空间。

The memory used by the XML data loaded into an XML document is anywhere from one to four times the size of the XML file on disk, depending on the "tagginess" of the data being loaded and whether the file was already in a Unicode format on disk. The following is a very rough formula for estimating the memory required for a given XML document:

内存中XML数据的大小可能是XML文件在磁盘上大小的一至四倍,这取决于载入数据的“标签比重”和它在磁盘上是否已经是Unicode编码格式的。以下是一个粗略的公式,用来估计给定的XML文档需要的内存空间大小:

ws = 32(n+t) + 12t + 50u + 2w;

The following table describes the parts of the formula:

下表介绍了公式中的各个部分:

Part
项目

Description
描述

ws

The working set in bytes.
工作集的大小(单位为字节)

n

The number of element and attribute nodes in the tree. Each element, attribute, attribute value, and text content has one node (for example, <element attribute = "value">text</element> = four nodes).
树中元素和属性节点的数量。每一个元素,属性,属性的值和文本内容都有一个节点(例如,<element attribute = "value">text</element> 共四个节点)

t

The number of text nodes.
文本节点的数量

u

The number of unique element and attribute names.
元素和属性的唯一名数量。

w

The number of Unicode characters in text content (including attribute values). Note that loading single-byte ANSI text into memory results in twice the number, because all text is stored as Unicode characters, which are two bytes each.
文本内容中Unicode字符的数量(包括属性值)。注意,将单字节的ANSI文本载入内存后会占用两倍的空间大小,因为它们会以Unicode字符存储,每个字符占用两个字节。

This assumes you do not set the preserveWhiteSpace flag; when you do, more nodes are created to preserve the white space between elements, using more memory.

以上公式是基于没有设置preserveWhiteSpace标志的情况;当你设置该标志时,会创建更多的节点来保留元素之间的空格,这样就会占用更多的内存空间。

For the sample data above, we see the following working set numbers (not including the initial startup working set):

对于前述的样品文件,以下表格显示了所需的工作空间大小(不包括工作空间初始化时的工作空间):

Sample
样品

Working set
工作空间

Ratio to file size
与磁盘文件大小的比例

Ado.xml

4,689,920

2.16

Hamlet.xml

704,512

1.25

Ot.xml

10,720,000

1.39

Northwind.xml

249,856

0.51

An element-heavy XML document containing a lot of white space between elements and stored in Unicode can actually be smaller in memory than on disk. Files that have a more balanced ratio of elements to text content, such as Hamlet.xml and Ot.xml, end up at about 1.25 to 1.5 the UCS-2 file size when in memory. Files that are very data-dense, such as Ado.xml, end up more than twice the disk-file size when loaded into memory.

一个元素比重很大,在各元素之间有很多空格并且以Unicode格式存储的XML文档可能在内存空间所需的空间比在磁盘上要少。而元素和文本内容比较平衡的文档,如Hamlet.xml和Ot.xml,可能在内存中所占空间与在磁盘上以UCS-2格式占用的空间大小比为1.25至1.5。而那些数据密集型的文档,就像Ado.xml那样,占用的内存空间可能会是在磁盘上大小的两倍或者更多。

Megabytes Per Second

百兆字节每秒

For the megabytes-per-second metric, I loaded each sample file 10 times in a loop on a Pentium II 450-MHz dual-processor computer running Windows 2000, measured the load times, and averaged the results.

对于百兆字节每秒这个度量指标,我通过以下试验来衡量载入时间:在Pentium II 450-MHz双处理器,运行Windows 2000的计算机上,将每个样品文件循环载入10次,得到载入时间,并进行平均,结果如下表所示:

Sample
样品

Load time (milliseconds)
载入时间(单位:毫秒)

MB/second
MB/
秒

Nodes/second
节点/秒

Ado.xml

677

3.2

184,909

Hamlet.xml

104

5.3

116,432

Ot.xml

1063

7.2

111,682

Northwind.xml

62

7.8

103,887

Also shown in this table is a measure of nodes per second. Notice how this correlates with megabytes per second. The more nodes processed per buffer of input data, the slower the absolute throughput. Conversely, the more compact the nodes are (as in Ado.xml), the higher the nodes per second.

在上面的表格中还显示了节点/秒的测试结果。请注意它与百兆字节每秒之间的关系。每个输入数据的缓冲区中节点数量越多,输出的绝对量就越少。相反,节点越紧凑(就像Ado.xml那样),每秒处理的节点数就越多。

Attributes vs. Elements
属性与元素

You could conclude from this that attribute-heavy formats (such as that of Ado.xml) deliver more data per second than element-heavy formats. But this should not be the reason for you to switch everything to attributes. There are many other factors to consider in the decision to use attributes versus elements.

你可以从上面得到结论:属性比重大的格式(就像Ado.xml那样)比元素比重大的格式每秒传递的数据量更大。但是这并不是要你将所有的东西都用属性来表达。在考虑使用元素还是属性时,还有很多其他的因素要斟酌。

【技术纵览】行为识别前沿模型演进:从CNN到多模态大模型 本文全面解析了行为识别技术从CNN到多模态大模型的演进历程,重点介绍了SlowFast、TimeSformer、VideoMAE和InternVideo等SOTA模型的核心创新与应用实践。通过对比分析各代模型在Kinetics-400等数据集上的表现,揭示了自监督学习和多模态融合如何推动行为识别准确率突破85%,并探讨了工业部署中的技术选型策略与优化方向。 阅读详情

相关推荐

Prometheus+Grafana部署及企业微信邮件/群消息告警通知配置

本文详细介绍了在Ubuntu 22.04系统上部署普罗米修斯监控系统的完整流程。首先说明了系统配置要求(2核CPU、4G内存、100G硬盘),然后分步骤指导下载、解压和安装普罗米修斯服务。文章包含配置prometheus.yml文件、启动服务、设置系统服务等关键操作,并提供了访问9090端口验证服务的方法。接着介绍了通过node_exporter监控Linux主机的配置过程,包括安装、启动服务和修改普罗米修斯配置文件添加监控项。最后还涉及了mysqld_exporter的部署流程,用于监控MySQL数据库服

m0_58761900的博客 1647

[网友LionD8的毕业论文]Windows2000 内核级进程隐藏、侦测技术

Windows2000 内核级进程隐藏、侦测技术                                                                                               指导老师:龙老师                                                                         

heiyeluren的blog(黑夜路人的开源世界) 4188

Android 13 录音APK在后台无数据的处理

未获取到录音数据

chenchen4310的博客 1186

Inside MSXML Performance(MSXML性能分析) (3) (转)

Inside MSXML Performance(MSXML性能分析) (3) (转)[@more@]MSXML Featuresmicrosoft-com:Office:office" /> MSXML特点 Next...

csd3176的博客 143

时间卷积网络(TCN):结构+pytorch代码

文章目录TCNTCN结构1-D FCN的结构因果卷积(Causal Convolutions)膨胀因果卷积(Dilated Causal Convolutions)膨胀非因果卷积(Dilated Non-Causal Convolutions)残差块结构pytorch代码讲解 TCN   TCN(Temporal Convolutional Network)是由Shaojie Bai et al....

Leon_winter的博客 11万+

STM32驱动HC-SR04超声波模块:两种精准测距方案详解

本文详解STM32驱动HC-SR04超声波模块的两种精准测距方案:定时器中断计数法和外部中断边沿检测法。涵盖硬件连接、代码实现与优化技巧,帮助开发者根据精度和复杂度需求选择合适方案,提升超声波测距在嵌入式项目中的稳定性和准确性。

g5h6i的博客 691

Inside MSXML Performance(MSXML性能分析)

Inside MSXML PerformanceMSXML性能分析Chris Lovett Microsoft CorporationFebruary 21, 2000Download the source code for this article (1.17MB)下载本文中示例的源代码ContentsMetricsMSXML FeaturesWorking SetM

ayusay的专栏 1240

手把手教学,Python 游戏编程之实现飞机大战(含源代码)

我想大家都是有玩过类似飞机大战的射击类游戏,也享受目标被消除通过后带来的愉悦感。那么如果用Python来实现飞机大战游戏?下面就跟大家一起用Python来做一个小游戏,不仅可以从中感受到乐趣,还可以提升自己的能力。

veratata的博客 1万+

Inside MSXML Performance(MSXML性能分析) (7)

小结The XML team at Microsoft has done some great work to improve the performance of the MSXML parser over the last three releases. They made a major improvement to the scalability of MSXML for the Wi

ayusay的专栏 1072

【iceberg数据一致性】iceberg如何保证高并发数据一致性

那么在高并发的时候,同时操作某张表时是如何运作的呢?其实这里iceberg引用了乐观锁的方法。其实在写入数据的时候是有一个验证的操作的,即在准备写入时会检查原文件和带写入文件的差异,如果存在本次写入数据以外的数据,则代表有其他操作已经更新了原文件,那么本次写入会取消,并重试写入的步骤,知道验证完成,写入完成,如此就保证了数据的一致性,并且也解决了HMS锁的问题。在使用iceberg写数据时,一直弄不清楚为什么iceberg写入快,并且能够保证数据的一致性。今天决定搞清楚这个问题,经过查询和理解,写下来。

你的博客 1051

大模型产品Deepseek(七)、可视化本地知识库搭建详细教程(Cherry Studio)

Cherry Studio 为智能体的开发提供了一个强大的可视化平台,结合大模型和嵌入式知识库,它可以在多个应用场景中提供智能化的支持。如果你有进一步的需求或问题,可以继续在 Cherry Studio 中进行更多自定义配置,或者通过 API 调用集成到你的应用中。现在,知识库已经搭建并与 DeepSeek 模型连接好,接下来,我们将使用 Cherry Studio 提供的可视化界面进行智能提问。为了让智能体能够通过大模型查询到知识库中的信息,你需要为知识库配置索引和匹配模型。

xiaoqi270620903的专栏 1350

Inside MSXML Performance(MSXML性能分析) (6)

Validation验证Validation compares the types of elements in an XML document against a Document Type Definition (DTD) or XML Schema. For example, the DTD may say that all "Customer" elements must cont

ayusay的专栏 1001

ESP32 VSCode开发环境配置

ESP32 VSCode开发环境配置

qq_53529450的博客 517

Inside MSXML Performance(MSXML性能分析) (2)

Metrics度量指标There are four key performance metrics that most of you are interested in as you develop your XML-based Web application: 当开发基于XML的Web应用程序时,大部分人对以下四个主要的性能度量指标感兴趣:·                  

ayusay的专栏 968

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

Inside MSXML Performance(MSXML性能分析) (7) (转)

Inside MSXML Performance(MSXML性能分析) (7) (转)[@more@] ...

csd3176的博客 118

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

Inside MSXML Performance(MSXML性能分析) (4)

First DOM Walk Working Set Delta第一次DOM树遍历引起的工作空间增量Walking the DOM tree for the first time has an impact on the working set metric because some nodes in the tree are created on demand. To illustrat

ayusay的专栏 1240

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Inside MSXML Performance(MSXML性能分析) (转)

Inside MSXML Performance(MSXML性能分析) (转)[@more@]XML02212000>Inside MSXML Performancemicrosoft-com:Office:office"...

csd3176的博客 128

Inside MSXML Performance(MSXML性能分析) (6) (转)

Inside MSXML Performance(MSXML性能分析) (6) (转)[@more@]ValidationXML:namespace prefix = o ns = "urn:schemas-microsoft-...

csd3176的博客 174

Inside MSXML Performance(MSXML性能分析) (2) (转)

Inside MSXML Performance(MSXML性能分析) (2) (转)[@more@]MetricsXML:namespace prefix = o ns = "urn:schemas-microsoft-com...

csd3176的博客 142

Inside MSXML Performance(MSXML性能分析) (4) (转)

Inside MSXML Performance(MSXML性能分析) (4) (转)[@more@]First dom Walk Working Set DeltaXML:namespace prefix = o ns = "...

csd3176的博客 119

Inside MSXML Performance(MSXML性能分析) (5) (转)

Inside MSXML Performance(MSXML性能分析) (5) (转)[@more@]SaveXML:namespace prefix = o ns = "urn:schemas-microsoft-com:Of...

csd3176的博客 128

Inside MSXML Performance(MSXML性能分析) (5)

Save保存Saving a document is generally slower than loading one. The following table summarizes the differences:保存一个文档总的来说要比载入慢。下面的表格显示了其中的区别:Sample样本Load (milliseconds)载入(毫秒)Save

ayusay的专栏 1080

ASP计数器设计详解

 ASP计数器设计详解Active Server Pager(动态服务器主页,简称ASP),通过读写服务器的文件,结合script语言(VBscript或Jscript)和html码可以方便地实现页面计数器功能。现流行的ASP教材和网络上的ASP教程都谈到过ASP计数器的设计问题,但是都过于简单,比如没有提到怎样实现计数器脚本和主页面的分离以及图象计数器的实现等。下面就作者为单位制作NT

ayusay的专栏 2028

MyBatis / MyBatis-Plus XML 动态SQL 全套知识点总结

本文系统总结MyBatis/MyBatis-Plus XML动态SQL核心知识点,涵盖<if>、<where>、<trim>、<set>、<foreach>等标签用法与常见坑点,强调#{}防注入、${}仅用于动态表名/字段,详解模糊查询、多条件拼接、批量操作及@Param注解使用规范。明确指出MP不替代XML,复杂场景仍需手写动态SQL,且分页插件对XML同样生效。最后提供选型建议:简单查询用Wrapper,复杂逻辑用XML,避免空集合、语法错误、注入风险等高频问题。

程序员猫爪 278

Apusic 应用服务器 list-components 空指针异常排查实录:一个空 XML 节点引发的连环崩溃

Apusic 应用服务器 list-components 空指针异常排查实录:一个空 XML 节点引发的连环崩溃

qq_45973421的博客 186

VisualXML 全新升级 | 新增J1939 协议支持

VisualXML 是一款功能强大的网络总线设计工具,专注于简化汽车电子网络数据操作。软件支持 DBC、LDF、ARXML、HEX 等主流格式,VisualXML V4.0 支持 J1939 协议,一键导出 DBC/Arxml 文件。表格基于原有 CAN Matrix 模板拓展,无需额外进行表格切换......

WINDHILL风丘科技 221
上一篇: Inside MSXML Performance(MSXML性能分析)
下一篇: Inside MSXML Performance(MSXML性能分析) (2)
ayusay
博客等级 码龄25年 1粉丝 9原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值