Comments (6)
Sadly the MSIX SDK doesn't support parallel unpack, but I don't see how just calling CopyTo in a different thread after the IAppxFile was obtained via IAppxFilesEnumerator::GetCurrent will fail.
You just need to make sure that the IAppxFilesEnumerator calls are made in the main thread and being careful about the ref count for it.
I might be wrong, but it is worth trying.
from msix-packaging.
The memory of the input streams are not released because the owner is the IAppxPackageReader
object (by the time the stream is retrieve in ExtractFile
the ref count should be 3 or so). The output stream is released once the ExtractFile
call is completed.
What is happening here is that one the stream gets copied into the output stream, if the stream hasn't been inflated we will allocate some buffers. Those allocations are what you are seeing between the two breakpoints in the screen shot.
Now, I agree that this is problematic for big packages. The easiest way to fix it would be to clear those buffers once the inflate is done which is basically calling
self->m_compressedBuffer.get()->clear();
self->m_compressedBuffer.get()->shrink_to_fit();
self->m_inflateWindow.get()->clear();
self->m_inflateWindow.get()->shrink_to_fit();
in this block
If you can easily repro can you try it?
As of the system account issue, I'm not that really familiar so I can't assure that there's a memory limit where there are no users logged in.
from msix-packaging.
@msftrubengu Thanks a lot for your reply. We have tried it and it is working. I have one query wrt parallel installation of multiple MSIX packages via MSIX SDK.
The ExtractFile
is using IStream
class which is inherited from ISequentialStream
. Is it right to invoke fileStream->CopyTo
from different threads simultaneously ?
We have observed some crashes in the past wrt parallel extraction of MSIX packages and hence, we want to understand whether the parallel extraction using ISequentialStream
is supported or not.
from msix-packaging.
@msftrubengu Just want to confirm wrt parallel unpacking
of MSIX packages using MSIX-SDK
Is it ok to perform unpack
operation for different MSIX
packages together ?
So, we can always perform the unpack
operation of a single MSIX package in a single thread but it is completely alright to invoke the unpack
of multiple MSIX packages together in separate threads.
As, per your above comment: You just need to make sure that the IAppxFilesEnumerator calls are made in the main thread
Currently, we are keeping a global mutex here:
(as in our case Multiple threads can invoke
Extractor::ExtractPayloadFiles()
together and hence, using a global static mutex we are controlling the execution of this method's logic for one MSIX package at a time)
Due, to this change - we are facing performance issues and hence, I am exploring the option to keep the unpacking of multiple MSIX packages in separate threads at the same time.
from msix-packaging.
@mtodd @tpope @sverrejoh @msftrubengu : I am still waiting for the reply on my above query.
from msix-packaging.
Related Issues (20)
- [BUG] msix-packaging AzDO tasks CI runs for files under the sample directory
- How does msixauth work? HOT 18
- [BUG]
- Is it possible to turn off some of the telemetry generated during checking for updates / applying updates? HOT 1
- Support for Windows Service installation via MSIX Core HOT 2
- Documentation of the APPX/MSIX format HOT 9
- [Feature Request] Make it possible to specify the recovery options for a packaged service HOT 1
- [BUG] Update msix-packaging Linux CI pipeline image to the latest
- This repo is missing important files
- [BUG] The secret variable given does not point to a valid password. HOT 11
- MSIX build AzDO task should fail if it doesn't build an msix package
- [BUG] Windows Services installed via MSIX become corrupted and can't start after package servicing HOT 1
- Email listed in SUPPORT.md is wrong HOT 1
- How to use `,` in Publisher name HOT 3
- [BUG] Cant sign dlls exes inside my MSIX when creating a published package to microsfot store HOT 3
- [BUG] Unable to compile on Linux / Clang 16.0.6 HOT 2
- Help in including Visual C++ redistributable in a .msix package HOT 1
- [BUG] AddPackageByAppInstallerFileAsync causes crash when compiling for x86 on an ARM64 system
- MSIXAUTH not supported on this OS HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msix-packaging.