其他配置 > 提高 ThingView WebGL 的性能
  
提高 ThingView WebGL 的性能
为了提高 ThingView WebGL 小组件的性能,建议使用 WebAssembly MIME 类型优化小组件。
通过编辑 web.xmlserver.xml 文件,配置 Apache Tomcat 服务器以支持 WebAssembly MIME 类型作为文件:
1. 首先,停止 Apache Tomcat 和 ThingWorx Integration Runtime。如果配置了单一登录,请继续执行步骤 2。对于 Windchill 身份验证,请跳到步骤 3。
2. 对于采用单一登录的系统,请编辑 web.xml 文件:
a. 在文本编辑器中打开 <Tomcat 安装位置>\webapps\Thingworx\WEB-INF\web.xml
b. 向下滚动到文件的末尾,然后添加以下行:
<mime-mapping>
<extension>wasm</extension>
<mime-type>application/wasm</mime-type>
</mime-mapping>
3. 对于使用 Windchill 身份验证的系统,默认情况下 web.xml 已具有所需的 MIME 设置。
* 
如果您使用多个 Windchill 连接,请从以下文件夹中复制 web.xml 文件:<Navigate 安装位置>\MultiWindchillConfiguration\idp\
如果单独下载了 ptc-windchill-extension,也可以从 ptc-windchill-extension\idp\twx-8.3.x\multi 文件夹复制 web.xml 文件。
4. 要为身份验证类型添加压缩设置,请在文本编辑器中打开 <Tomcat 安装位置>\conf\server.xml
5. 在连接器端口部分中添加以下压缩属性:
compression="on"
compressionMinSize="1024"
compressableMimeType="application/wasm,text/html,text/xml,text/plain,text/css,text/javascript,application/javascript"/>
6. 启动 Apache Tomcat 和 ThingWorx Integration Runtime。