Skip to content

940663: Text Search Improvements added #4126

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

Open
wants to merge 1 commit into
base: hotfix/hotfix-v29.1.33
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions ej2-asp-core-mvc/pdfviewer/EJ2_ASP.MVC/text-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,39 @@ Searches for an array of strings within the document and returns the bounding re
{% endhighlight %}
{% endtabs %}

## Text Search Improvements

### Overview of Text Search Improvements

The primary goal of these improvements was to significantly reduce the time taken to search for text, especially in large PDF documents, and to provide quicker navigation to search results. The key improvements include:

**Faster Text Search Result Counts:** The time required to calculate and return the total number of occurrences of a search term has been dramatically reduced.

**Improved First Occurrence Marking and Navigation:** Marking the first occurrence of the search term on the first page is now faster, and navigating to the first occurrence on distant pages is also more efficient.

**Handling Large Documents:** Performance improvements are especially noticeable in large PDF files, such as those with 500+ pages or 1000+ pages, where the search process is optimized for speed and responsiveness.

### Performance Comparison
Below are the comparisons of search performance before and after the improvements across various document sizes:

| Scenario | Before changes | After changes |
|----------------------------------------------------|---------------------|--------------------|
| **500 pages document - Result of 'the' word with 9090 results** | | |
| Mark the first occurrence on first page | 37.64 sec | 0.71 sec |
| To get the total count value | 37.64 sec | 2.81 sec |
| **500 pages document - Navigate the first occurrence in the 100th page** | 37.64 sec | 0.79 sec |
| **1310 pages document - Navigate the first occurrence in the 1271st page** | 1.44 min | 4.54 sec |
| **Text only present within first 10 pages of a 500 pages document** | 37.64 sec | 0.82 sec |
| **Text only present within first 10 pages of a 1310 pages document** | 37.64 sec | 0.87 sec |

### Key Benefits

**Significantly Reduced Search Time:** Users now experience faster text search across multiple scenarios, including large documents.

**Improved User Experience:** Immediate search results, faster navigation to occurrences, and quick total count retrieval ensure users can work with large PDFs efficiently.

**Optimized for Large Documents:** The performance is particularly noticeable with documents containing hundreds or thousands of pages, improving overall usability for users with extensive files.

## See also

* [Toolbar items](./toolbar)
Expand Down
33 changes: 33 additions & 0 deletions ej2-asp-core-mvc/pdfviewer/EJ2_ASP.NETCORE/text-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,39 @@ Searches for an array of strings within the document and returns the bounding re

[View sample in GitHub](https://github.com/SyncfusionExamples/asp-core-pdf-viewer-examples/tree/master/How%20to/TextSearch)

## Text Search Improvements

### Overview of Text Search Improvements

The primary goal of these improvements was to significantly reduce the time taken to search for text, especially in large PDF documents, and to provide quicker navigation to search results. The key improvements include:

**Faster Text Search Result Counts:** The time required to calculate and return the total number of occurrences of a search term has been dramatically reduced.

**Improved First Occurrence Marking and Navigation:** Marking the first occurrence of the search term on the first page is now faster, and navigating to the first occurrence on distant pages is also more efficient.

**Handling Large Documents:** Performance improvements are especially noticeable in large PDF files, such as those with 500+ pages or 1000+ pages, where the search process is optimized for speed and responsiveness.

### Performance Comparison
Below are the comparisons of search performance before and after the improvements across various document sizes:

| Scenario | Before changes | After changes |
|----------------------------------------------------|---------------------|--------------------|
| **500 pages document - Result of 'the' word with 9090 results** | | |
| Mark the first occurrence on first page | 37.64 sec | 0.71 sec |
| To get the total count value | 37.64 sec | 2.81 sec |
| **500 pages document - Navigate the first occurrence in the 100th page** | 37.64 sec | 0.79 sec |
| **1310 pages document - Navigate the first occurrence in the 1271st page** | 1.44 min | 4.54 sec |
| **Text only present within first 10 pages of a 500 pages document** | 37.64 sec | 0.82 sec |
| **Text only present within first 10 pages of a 1310 pages document** | 37.64 sec | 0.87 sec |

### Key Benefits

**Significantly Reduced Search Time:** Users now experience faster text search across multiple scenarios, including large documents.

**Improved User Experience:** Immediate search results, faster navigation to occurrences, and quick total count retrieval ensure users can work with large PDFs efficiently.

**Optimized for Large Documents:** The performance is particularly noticeable with documents containing hundreds or thousands of pages, improving overall usability for users with extensive files.

## See also

* [Toolbar items](./toolbar)
Expand Down