• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

microsoft / botbuilder-dotnet / 282079
79%
main: 78%

Build:
Build:
LAST BUILD BRANCH: southworks/update/azure-cosmos
DEFAULT BRANCH: main
Ran 13 Dec 2021 11:27PM UTC
Jobs 1
Files 1022
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Dec 2021 11:27PM UTC coverage: 78.662% (-0.02%) from 78.677%
282079

push

CI-PR build

Microsoft.VisualStudio.Services.TFS
LG Performance & Scalability: Speed up loading, fix concurrency and memory problems (#6061) (#6062)

* Foreach: refactor from recursive to iterative implemeentation to keep stack depth constant

* Foreach: leave legacy foreach unchanged, deprecate it, and make ForEachElement the default

* Foreach: fix name in deprecation message

* LG Performance & Scalability: Speed up loading, fix concurrency problems, fix memory problems.

+ LG file content was loaded synchronously in a the TEmplateEngineLanguageGenerator constructor, not allowing for asynchronous execution and blocking the thread while we waited for each file to load. With this fix, we let LG load in the constructor for legacy paths, but the new paths have a LoadAsync method that loads asynchronously. The new path is internal only, meaning that the public surface is not affected. Each LGenerator is loaded only once by using LAzy with the default ExecutionAndPublication thread safety mode.
+ AdaptiveDialogBot: LanguageGeneratorManager can take minutes in a sizable bot. If there are multiple parallel requests, LanguageGeneratorManager will get constructed once per request, allowing for servers to do the same work and throw OutOfMemoryException, consuming upwards of 14GB. This fix uses Lazy initialization in AdaptiveDialogBot with ExecutionAndPublication thread safe mode to ensure that only one LanguageGeneratorManager is created at ones
+ Multiple reads of file contents: For our perf sample, each LG file was being read more than 30 times, despite its content never changing. Also there was no protection for parallel reads, which could lead to unexpected concurrency failures. This fix adds a caching element to FileResource and at the same time uses the Lazy ExecutionAndPublication thread safety mode to ensure that only one thread initializes the value. When there is a change Event, a new Fileresource is created so this does not affect functionality.

Some results for our test dataset:

... (continued)

24843 of 31582 relevant lines covered (78.66%)

0.79 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
/libraries/Microsoft.Bot.Builder.Dialogs.Declarative/Resources/FileResource.cs
1
100.0
/libraries/Microsoft.Bot.Connector.Streaming/TaskExtensions.cs
2
100.0
/libraries/Microsoft.Bot.Connector.Streaming/Transport/TransportHandler.cs
4
100.0
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/AdaptiveDialogBot.cs
5
100.0
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Generators/LanguageGeneratorManager.cs
8
100.0
/libraries/Microsoft.Bot.Connector.Streaming/Session/StreamingSession.cs
14
100.0
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Generators/TemplateEngineLanguageGenerator.cs
Jobs
ID Job ID Ran Files Coverage
1 282079.1 13 Dec 2021 11:27PM UTC 0
78.66
Source Files on build 282079
  • Tree
  • List 1022
  • Changed 9
  • Source Changed 4
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 96edda82 on github
  • Prev Build on 4.15 (#282069)
  • Next Build on 4.15 (#286025)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc