Hello,
I'm trying to work with Telerik PDF-Processing right now. But an issue appeared, that I have no clue how to solve.
In this current project, time is a very important aspect, so it's necessary for me to save milliseconds everywhere i can. So I logged the time for all of the Processes and, I don't know why, the first time, i use the methods, it needs more time, than the other later runs.
Here's a simple example out of this project:
private List<RadFixedPage> GetAllAddingPages(List<string> pathList)
{
List<RadFixedPage> AllPages = new List<RadFixedPage>();
for (int i = 1; i < pathList.Count; i++)
{
RadFixedPage read = provider.Import(File.ReadAllBytes(pathList[i])).Pages[0];
AllPages.Add(read);
}
return AllPages;
}
The method's supposed to read the first pages of every document, that is filled in the "PathList."
I've stopped the first run and it needed about 150-160ms to execute. The second run is all about 20ms. There are only 3 Files that've been loaded.
So i tested more..
If i only load a document, that has no Image inside, it needs about the same time on the first run. If afterwards a document is loaded with only an Image, it needs long time also (103ms). If I open 3 documents (Vectorgraphics, Images and Text) it needs the 150-160ms.
Is this a known issue, or can somebody maybe help me with this?
This is only one example, where this problem appears. But if there is a solution for this one, i can maybe apply it to the other methods.
Best regards
Jakob