-
Notifications
You must be signed in to change notification settings - Fork 56
1006383-Added Performance Benchmark samples #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MathanKumarVaradhaRajaPerumal
merged 12 commits into
main
from
1006383_Performance_benchmark_examples
Feb 9, 2026
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
5977796
1006383-Added new files
Kathiresan4347 d3501d5
Added HTML sample
GOPINATH-SF4767 bbc40bc
Added RTF Resave Sample
GOPINATH-SF4767 4dea109
Added Accept all sample
GOPINATH-SF4767 bc36ef2
Added Mailmerge Sample
GOPINATH-SF4767 2775198
Added Reject All sample
GOPINATH-SF4767 20cc144
Added UpdateDocumentFields Sample
GOPINATH-SF4767 6445972
Added UpdateTOC Sample
GOPINATH-SF4767 425f745
Added WordCompare Sample
GOPINATH-SF4767 8938b38
Removed documents
GOPINATH-SF4767 77679f7
Modified inputs
GOPINATH-SF4767 959fa25
Addressed feedback
GOPINATH-SF4767 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...ces/Accept-All/.NET/Accept-All-Changes-Word-document/Accept-All-Changes-Word-document.sln
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.14.36915.13 d17.14 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accept-All-Changes-Word-document", "Accept-All-Changes-Word-document\Accept-All-Changes-Word-document.csproj", "{091C5157-E742-7A50-D648-F46E1D32F5B1}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {091C5157-E742-7A50-D648-F46E1D32F5B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {091C5157-E742-7A50-D648-F46E1D32F5B1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {091C5157-E742-7A50-D648-F46E1D32F5B1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {091C5157-E742-7A50-D648-F46E1D32F5B1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {DB90BBCF-EBA0-4566-9135-989B947554B8} | ||
| EndGlobalSection | ||
| EndGlobal |
21 changes: 21 additions & 0 deletions
21
...es-Word-document/Accept-All-Changes-Word-document/Accept-All-Changes-Word-document.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <RootNamespace>Accept_All_Changes_Word_document</RootNamespace> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Update="Data\Input.docx"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| <None Update="Output\.gitkeep"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| </ItemGroup> | ||
| </Project> |
Binary file added
BIN
+33.1 KB
...ll/.NET/Accept-All-Changes-Word-document/Accept-All-Changes-Word-document/Data/Input.docx
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...ll/.NET/Accept-All-Changes-Word-document/Accept-All-Changes-Word-document/Output/.gitkeep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| |
35 changes: 35 additions & 0 deletions
35
...ept-All/.NET/Accept-All-Changes-Word-document/Accept-All-Changes-Word-document/Program.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using Syncfusion.DocIO; | ||
| using Syncfusion.DocIO.DLS; | ||
| using System.Diagnostics; | ||
|
|
||
| namespace Accept_All_Changes_Word_document | ||
| { | ||
| class Program | ||
| { | ||
| static void Main(string[] args) | ||
| { | ||
| //Load the document. | ||
| using (FileStream inputFileStream = new FileStream(Path.GetFullPath(@"Data/Input.docx"), FileMode.Open, FileAccess.Read)) | ||
| { | ||
| //Load the word document. | ||
| using (WordDocument wordDocument = new WordDocument(inputFileStream, FormatType.Docx)) | ||
| { | ||
| Stopwatch stopwatch = new Stopwatch(); | ||
| stopwatch.Start(); | ||
| //Accepts all the tracked changes revisions in the Word document | ||
| if (wordDocument.HasChanges) | ||
| wordDocument.Revisions.AcceptAll(); | ||
| stopwatch.Stop(); | ||
| Console.WriteLine($"Time taken for accept all changes in word Document: " + stopwatch.Elapsed.TotalSeconds); | ||
| //Create file stream | ||
| using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite)) | ||
| { | ||
| //Save the Word document to file stream | ||
| wordDocument.Save(outputFileStream, FormatType.Docx); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
Binary file removed
BIN
-26.4 KB
...erge-word-document/Clone-and-merge-word-document/Data/DestinationDocument/Document-2.docx
Binary file not shown.
Binary file removed
BIN
-298 KB
...rge-word-document/Clone-and-merge-word-document/Data/DestinationDocument/Document-50.docx
Binary file not shown.
Binary file removed
BIN
-1.54 MB
...ge-word-document/Clone-and-merge-word-document/Data/DestinationDocument/Document-500.docx
Binary file not shown.
Binary file removed
BIN
-26.4 KB
...and-merge-word-document/Clone-and-merge-word-document/Data/SourceDocument/Document-2.docx
Binary file not shown.
Binary file removed
BIN
-298 KB
...nd-merge-word-document/Clone-and-merge-word-document/Data/SourceDocument/Document-50.docx
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
Performance-metrices/Find-and-Replace/.NET/Find-and-Replace/Find-and-Replace.slnx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <Solution> | ||
| <Project Path="Find-and-Replace/Find-and-Replace.csproj" /> | ||
| </Solution> |
Binary file renamed
BIN
+1.54 MB
...ent/Data/SourceDocument/Document-500.docx → ...place/Find-and-Replace/Data/Template.docx
Binary file not shown.
24 changes: 24 additions & 0 deletions
24
...-metrices/Find-and-Replace/.NET/Find-and-Replace/Find-and-Replace/Find-and-Replace.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <RootNamespace>Find_and_Replace</RootNamespace> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <None Update="Data\Template.docx"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| <None Update="Output\.gitkeep"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
1 change: 1 addition & 0 deletions
1
Performance-metrices/Find-and-Replace/.NET/Find-and-Replace/Find-and-Replace/Output/.gitkeep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| |
33 changes: 33 additions & 0 deletions
33
Performance-metrices/Find-and-Replace/.NET/Find-and-Replace/Find-and-Replace/Program.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| using Syncfusion.DocIO; | ||
| using Syncfusion.DocIO.DLS; | ||
| using System.Diagnostics; | ||
|
|
||
| namespace Find_and_replace_in_a_worddocument | ||
| { | ||
| class Program | ||
| { | ||
| static void Main(string[] args) | ||
| { | ||
| using (FileStream fileStreamPath = new FileStream(Path.GetFullPath(@"Data/Template.docx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) | ||
| { | ||
| //Open the template Word document. | ||
| using (WordDocument document = new WordDocument(fileStreamPath, FormatType.Automatic)) | ||
| { | ||
| Stopwatch stopwatch = new Stopwatch(); | ||
| stopwatch.Start(); | ||
| //Find all occurrences of a misspelled word and replaces with properly spelled word | ||
| int replacedCount = document.Replace("document", "DocIO", false, false); | ||
| stopwatch.Stop(); | ||
| Console.WriteLine(replacedCount); | ||
| Console.WriteLine($"Time taken for Replace (string):" + stopwatch.Elapsed.TotalSeconds); | ||
| //Create file stream | ||
| using (FileStream outputFileStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.Create, FileAccess.ReadWrite)) | ||
| { | ||
| //Save the Word document to file stream | ||
| document.Save(outputFileStream, FormatType.Docx); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
25 changes: 25 additions & 0 deletions
25
Performance-metrices/Mail-Merge/.NET/Mail-Merge-Word-document/Mail-Merge-Word-document.sln
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| | ||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio Version 17 | ||
| VisualStudioVersion = 17.14.36915.13 d17.14 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mail-Merge-Word-document", "Mail-Merge-Word-document\Mail-Merge-Word-document.csproj", "{6CC5936C-F8A1-5A2B-88D6-BFE228F5D889}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|Any CPU = Debug|Any CPU | ||
| Release|Any CPU = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {6CC5936C-F8A1-5A2B-88D6-BFE228F5D889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
| {6CC5936C-F8A1-5A2B-88D6-BFE228F5D889}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
| {6CC5936C-F8A1-5A2B-88D6-BFE228F5D889}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
| {6CC5936C-F8A1-5A2B-88D6-BFE228F5D889}.Release|Any CPU.Build.0 = Release|Any CPU | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| GlobalSection(ExtensibilityGlobals) = postSolution | ||
| SolutionGuid = {81910D4A-53B0-4C43-82F1-FE55DF40458A} | ||
| EndGlobalSection | ||
| EndGlobal |
Binary file added
BIN
+41.4 KB
...ices/Mail-Merge/.NET/Mail-Merge-Word-document/Mail-Merge-Word-document/Data/Template.docx
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
...ge/.NET/Mail-Merge-Word-document/Mail-Merge-Word-document/Mail-Merge-Word-document.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <RootNamespace>Mail_Merge_Word_document</RootNamespace> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Syncfusion.DocIO.Net.Core" Version="*" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Update="Data\Template.docx"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| <None Update="Output\.gitkeep"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| </ItemGroup> | ||
| </Project> |
1 change: 1 addition & 0 deletions
1
...etrices/Mail-Merge/.NET/Mail-Merge-Word-document/Mail-Merge-Word-document/Output/.gitkeep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print with sentences