Patch creation slows down due to unaccessible files - Advanced Installer Community
Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Patch creation slows down due to unaccessible files

Hi Advanced Installer Support Team,

Currently I'm using Advanced Installer 12.2 and trying to create some patches for our product. During my work I noticed that weird log messages are printed in the dialog which is visible while our patch is being created, apparently some files are inaccessible for your tool:

"Could not read the patch cache info from <filename>.chm.PCI file. Error: 2"

Furhermore I think patching operation significantly slows down when this kind of messages are printed.

So actually what happens is:
1. Choosing proper MSI files for patching, even the patch creation is successfull. The patch can be applied later on without any problems. Our real problem is that we don't know what these messages mean as well as the speed of patch creation.
2. Pressing the "Build" button of our patch project. Everything seems to be fine, normal output messages like "Comparing file A to file B" is printed in the first phase of patching, these lines are following each other rather quickly.
3. After a point your dialog starts to print the given error messages after each other. Jumping from one file to the next takes much more time than what comparison took. Based on our calculation these messages double our waiting time so that the full process can take over 20 minutes.

It'd be really appreciated if you could advice us something in order to get rid of those messages!

Naturally I've tried to fix it by myself and done the following things:
1. Checked whether files really exist or not under the specified path of the error messages -> all files are located under the proper path, no idea why your dialog prints "could not read".
2. Obviously I had admin privilegies.
3. Cleared the CACHE folder completely before clicking on Rebuild of the patch project -> files are still missing.

Could you please help us to overcome this issue?

Thanks in advance for your answers!

Regards,
Zsolt Kollarts
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Patch creation slows down due to unaccessible files

Hello Zsolt,

I'm not sure why this happens. For testing purposes only, can you add "Everyone -> Full Control" permissions on your working folders under which the patch is built and see if this helped?

It would be very useful if you could find out a pattern or test case when this messages appears and forward it to us so we can further investigate on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Re: Patch creation slows down due to unaccessible files

Hi Daniel,

Luckily I managed to make some progress on this issue, please let me share my findings with you.

1. Based on your proposal I reviewed the permissions of my working folders and set Full Control for all users. The problem still occurred.

2. Noticed that "Could not read file ..." messages are printed only when we create a patch for the first time. It means if we use a different target or upgraded version - and of course create the relevant images - then the first build procedure shows many error messages and makes our build time pretty long. Clicking once more on the Build or Rebuild starts patch creation in the same way as before but no "Could not read ..." messages are visible, therefore running time is less than the half. I find it interesting as nothing has changed in between in terms of the project.

3. Another interesting thing is that I could not see the given messages if different folders are set in "Builds/Administrative installs" and "Builds/Cache folder" fields of the patch project.

4. Apparently exe files are problematic only. If I ever see the "Could not read ..." message, it always refers to an exe file.

Summary: On the basis of the facts above you should perform the following things in order to see the messages:
1. Open the patch project and update the paths of the upgraded and target versions depending on where you save "1.0.0" and "1.0.1" folders. Note: The base project is also attached so that you can see how msi files have been created.
2. Make sure "Builds/Administrative installs" and "Builds/Cache folder" fields are pointing to the same location.
3. Click on Rebuild -> you will see the "Could not read ..." messages.
4. Click on Rebuild once more -> no error messages are shown.
5. Refresh both the upgraded and target images.
6. Click on Rebuild -> you will see again the "Could not read ..." messages.
7. Change either the path of "Builds/Administrative installs" or the path of "Builds/Cache folder" to a different value so that they are not the same now.
8. Repeat steps between 3 and 6 -> you will never see the error messages.

We used to modify our patches by adding new targets or upgraded version which means we have to wait a lot for the first msp file of ours. The fact that 2nd build would be quicker does not help us too much.

Could you please review this problem for me? Thanks in advance for your answers!

Regards,
Zsolt Kollarits
Attachments
Patch shows error messages.zip
(586.91 KiB) Downloaded 339 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Patch creation slows down due to unaccessible files

Hello Zsolt,

First of all I apologize for my delayed reply.

I've tested your scenario and replicated the behavior. This seems to be a limitation of the way Advanced Installer builds patches. Mainly this is what happens:
1. at build time Advanced Installer creates an administrative install image of the upgraded setup in a subfolder (having the same name as the upgraded image added in "Images" page, in your case i.e. "x64") of the folder specified in the "Administrative installs" field
2. then it calls a Windows Installer API which also caches the patch information in a subfolder (having the same name as the upgraded image added in "Images" page, in your case i.e. "x64") of the folder specified in the "Cache Folder" field
3. everytime you refresh the image of your upgraded setup Advanced Installer deletes the entire subfolder in which the upgraded image was extracted (which in your case is the same subfolder in which the cached patch info is residing too) and recreates the upgraded setup image

Therefore, if you use the same location for the "Administrative installs" and "Cache folder" in your patch project, then Advanced Installer will always delete the cached patch information when the upgraded setup image is refreshed. As a workaround, as you already found out you should use different folder location for the setup images and patch cache folder.

If you have any questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Re: Patch creation slows down due to unaccessible files

Hi Daniel,

Thanks for the deeper explanation, now we understand better how to speed up or procedure.

Best regards,
Zsolt
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Patch creation slows down due to unaccessible files

You're always welcome Zsolt.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Re: Patch creation slows down due to unaccessible files

Hi Daniel,

There is one more thing I´d like to ask from you: are you planning to do something with this problem on your side in the future? For example change the process how you generate the images so that we could use the same folder in "Administrative installs" and "Cache folder" fields. It´d be really good to keep all temp files created by our patch project under the same location.

Could you please let me know if you made in progress on this?

UPDATE:
The problem still exits if we create a patch from scratch. Add a new patch (with new upgraded name) to our patch project and clicking on the Build buttons will always print the given error messages, therefore it takes approx. 20 minutes for us instead of 7-8. Actually that´s the thing that we´d like to avoid.

Defining a new upgraded image in our patch project - no image folder exists for that particular name in the Cache folder yet - , clicking on Build and having a relatively low runtime (no error messages) would be the preferable way to go. Even if we set different folders in "Administrative tools" and "Cache folder" fields, error messages appear when running it for the first time. To simulate it please delete all contents of your Cache and Administrative folders before you click on Build.

Is there anything else you could suggest?

Thanks in advance,
Zsolt
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Patch creation slows down due to unaccessible files

Hello Zsolt,
There is one more thing I´d like to ask from you: are you planning to do something with this problem on your side in the future? For example change the process how you generate the images so that we could use the same folder in "Administrative installs" and "Cache folder" fields. It´d be really good to keep all temp files created by our patch project under the same location.

Could you please let me know if you made in progress on this?
I've added this improvement on our TODO list, but since yours is the only request implementing it has a very low priority for now. Thank you for your understanding. However, will update this thread when the improvement will be implemented. Until then, as a workaround your can create two different subfolders under the same location where you want to keep the temp files and use them for images and cache paths.
Defining a new upgraded image in our patch project - no image folder exists for that particular name in the Cache folder yet - , clicking on Build and having a relatively low runtime (no error messages) would be the preferable way to go. Even if we set different folders in "Administrative tools" and "Cache folder" fields, error messages appear when running it for the first time. To simulate it please delete all contents of your Cache and Administrative folders before you click on Build.

Is there anything else you could suggest?
I'm afraid this is the normal behavior and it cannot be avoided. During the patch build process Windows Installer always tries to use/access the cached resources and if they are missing the build time will increase as you saw. Unfortunately, the Windows Installer API for building patches doesn't have an option to skip the cached resources check when the cache folder is empty or doesn't exist.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”