Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Lu parser takes too long when paring simple intent section that has a large number of entity definitions #676

@feich-ms

Description

@feich-ms

Describe the bug

Given a lu file which has a intent defintion and a large number of entity definition under that intent, Any CLI tool that is calling lu parser will take a long time to parse the content with antlr. This is a bug caused by the rules in LUFileParser.g4. EntitySection and NewEntitySection are both root sections of paragraph and child sections of simpleIntentSection which may cause some unexpected loop.

To Reproduce

Steps to reproduce the behavior:

  1. create a lu file with a large number of entity definitions under a intent
  2. run 'bf luis:convert --in {lu file path}'
  3. See the execution time of this command

Expected behavior

It should take reasonable time to parse lu content

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

[bug]

Metadata

Metadata

Assignees

Labels

R9Release 9 - May 15th, 2020lunon luis api commands

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions