Search the Community
Showing results for tags 'message'.
Found 2 results
-
Worker thread queue performance
snowdev posted a topic in Algorithms, Data Structures and Class Design
I have an application which continuously receives websocket data and proccess them in the background on worker threads. Some data is critical and must be proccessed as quickly as possible. Once I receive the websocket data I fill a TObject descendent with the information and push it to the corresponding worker thread, which proccess and frees the object. I use Delphi 12. I would like to reduce as much overhead as possible in the flow, and beside the business rules, I believe there is an overhead in my worker thread consumer implementation, especially because I work with TObject descendants to transport the data. Also there has TObject cloning when the communication occurs from worker thread to worker thread, because each worker thread owns the queue objects lifetime, so I need to send a copy for each worker thread. I decided to make a benchmark to check by myself the differente in the differet approachs that I know about threading queues and know what has the best performance, attached has the benchmark I build. Nowdays I use CustomQueueObject.pas queue model in prod. In the example, has 4 examples of threading consumer queues: -A thread with TQueue<TObject>, TSempahore and TCritical Section; -A thread with TQueue<Pointer>, TSempahore and TCritical Section; -A thread with internal TThread queue processing TObject descendents, without events and sync objects; -A thread with internal TThread queue processing Pointers, without events and sync objects; After making tons of tests, for my surprise the fastest consumer queue is the example in CustomQueueObject.pas (which I already use), even with more creation/deletion and access control (sync object)... what brought me here to ask more experienced developers if I doing something wrong (according my examples as is my base). Mainly on Pointer examples as I rarely use pointers but I willing to change if its better. In my mind the internal thread queue would much more efficient for the reasons said above... I also thought that work with Pointers could highly improve the overal performance as in the workflow since I would have a single reference and only freed in the final. Could I be measuring the performance incorrectly? Thanks in advance! MultithreadingQueueBenchmark.zip- 29 replies
-
- multithreading
- queue
-
(and 5 more)
Tagged with:
-
Windows 10 not loading the Settings app after 22H2 upgrade/update
JohnLM posted a topic in General Help
After receiving my windows activation key for my new tablet, and after it "upgraded" my windows 10, to "Windows 10 2022 Update | Version 22H2" I was no longer able to access the windows sytem settings app. It sometimes pops up as a blank blue dialogbox with the familiar gear in the center, and then closes. For instance, when I right-click the desktop, and select 'Display settings' I get this error message (after the blue dialog box with the gear pops up and closes). "This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page." Or, when I try to open the Settings app directly, or Windows key+I, or from any place or method of activating Settings, I get this (below) and then it closes in a second or two. The following are things I have tried, I believe are all that I have tried so far: 1. open cmd and enter - sfc /scannow 2. open cmd and enter - Dism /Online /Cleanup-Image /CheckHealth 3. open cmd and enter - Dism /Online /Cleanup-Image /ScanHealth 4. open cmd and enter - Dism /Online /Cleanup-Image /RestoreHealth 5. open powershell and enter - * PowerShell -ExecutionPolicy Unrestricted -Command "& {$manifest = (Get-AppxPackage *immersivecontrolpanel*).InstallLocation + '\AppxManifest.xml' ; Add-AppxPackage -DisableDevelopmentMode -Register $manifest}" 6. open powershell and enter - * Get-AppXPackage -AllUsers -Name windows.immersivecontrolpanel | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml” -Verbose} 7. open powershell and enter - * Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml" -verbose} I've also tried a few of the registry hacks but they did not help. So now I am wondering what else can I do. Something in the 22H2 messed up the Settings's app's association. And I can't run a Settings Repair because I have to be in Settings to do that. Does anyone else have suggestions for me to try. I can create a system restore point and then try your suggestion(s). TIA