Partager via


Understand the Performance Benefit of Compiling Grammars

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Use these guidelines to understand when a grammar should be compiled to improve application performance.

Guidelines

Consider the following guidelines to prevent performance problems caused by large grammars:

  • In general, precompile and preload grammars larger than 100 KB. In particular, a large grammar generated by code outside of the application runtime, for example using a batch file, should be compiled and preloaded. For information about preloading resources, see How to: Specify an Application Manifest File for Preloaded Resources.
  • A 100 KB or smaller grammar can be opened as XML text, without preloading by Speech Engine Services and without a noticeable performance impact.

Dynamic Grammars

Dynamic grammars are typically created with Dialog Workflow APIs. Consequently, they are compiled but not precompiled without a noticeable impact on performance. Large grammars that need precompilation require excessive compilation time at runtime and do not recompile.

Conversational Grammar Builder

Grammars generated by Conversational Grammar Builder must be compiled at runtime.

See Also

Other Resources

Develop Grammars with Speech Grammar Tools
Use Conversational Grammar Builder to Create Grammars
Use Speech Grammar Editor to Create Grammars