提高 ThingView WebGL 的性能
为了提高 ThingView WebGL 小组件的性能,建议使用 WebAssembly MIME 类型来优化小组件。
通过编辑 web.xml 和 server.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\。
或者,如果已下载 Windchill-Navigate-Supplemental-Files-<版本>-bundle,也可以从 <补充文件下载位置>\idp\twx 文件夹中复制 web.xml 文件。
|
4. 要为身份验证类型添加压缩设置,请在文本编辑器中打开 <Tomcat 安装位置>\conf\server.xml。
5. 在连接器端口部分中添加以下 compression 属性:
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。