Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
141 views

How can I optimize my 'foreach' loop to read and process each line of a text file more efficiently in C#?

I have C# code that reads a .TXT file, processes each line, and subsequently inserts documents into a MongoDB database. Since the file contains many lines (approximately 70k), both reading all lines ...
evomoreira's user avatar
-3 votes
1 answer
56 views

How to safely thread DBContext in EF Core using Parallel.ForEachAsync [closed]

I am attempting to do some parallel processing interacting with a DbContext in EF Core as follows: var processingGroups = GenerateProcessingGroups(subscriptions); await Parallel.ForEachAsync(...
Cef's user avatar
  • 943
1 vote
0 answers
39 views

How to make flask asynchronous to handle multiple users at the same time?

I spun up a cloud server and put my flask web app code plus a frontend in there. When a user runs an operation on the frontend this gets sent to the backend endpoint as a JSON, then processed and ...
Rigori67's user avatar
1 vote
1 answer
298 views

Parallelising dlthub Rest API pipeline

I am trying to speed up the following dlt (dlthub) pipeline via parallelisation as shown in the documentation here: https://dlthub.com/docs/reference/performance#parallelism Here is the original (NOT ...
Elis Evans's user avatar
0 votes
0 answers
245 views

Should I use separate processes or worker threads with BullMQ for asynchronous tasks in NestJS?

I have a typical NestJS application and I integrated BullMQ to make use of queues for the following cases: Triggering emails and push notifications Making database reads and writes at specific dates ...
Tashi Tobgay Dakpa's user avatar
0 votes
0 answers
39 views

Event loop blocking in NodeJS

stack overflow community. I have an app that interacts with Docker using dockerode library in NodeJS. I'm generating services using it and everytime new service is being started, it builds unique ...
ZorT Legit's user avatar
0 votes
0 answers
35 views

How do I parallelize code where each worker needs to operate in a separate folder?

I have some code (let's call it a function do_stuff(x)) which makes calls to an external executable using subprocess.run. That external executable needs to read and write local files with hardcoded ...
Mike's user avatar
  • 79
0 votes
1 answer
79 views

How to combine asynchronous I/O and CPU-bound tasks efficiently in Python?

I'm working on a Python project where I need to handle both asynchronous I/O tasks (like reading from a file or making API requests) and CPU-bound tasks (like data processing or calculations). I’m ...
Meeooowwww's user avatar
0 votes
0 answers
57 views

A formal+didactic+schematic explanation of concurrency vs parallelism

tl;dr I think I have understood the concurrency vs parallelism examples below, but only really to the extent of those examples, and I'd like to get a more formal explanation that would allow (or help) ...
Enlico's user avatar
  • 28.9k
0 votes
0 answers
55 views

How can I use a thread pool to enable parallel processing in my Rust search application?

I'm working on a Rust application that searches for a query string in a file, and I want to utilize a thread pool to perform the search in parallel. Below is a simplified version of my code: use std::...
zeffo96's user avatar
-1 votes
2 answers
107 views

What problems might arise from ignoring this race condition?

I wish to represent a service that receives triggers to run a particular task, however it only runs that task once at a given time while ignoring concurrent triggers. My brain came up with an ...
shampu's user avatar
  • 51
1 vote
0 answers
123 views

OpenCL flush absurdly slow, seemingly triggered by clEnqueueReleaseGLObjects in OpenCL/OpenGL interop

I'm writing an interactive application which uses OpenCL 1.2 to render each frame and which uses OpenCL-OpenGL interop to copy the frame to an OpenGL texture which is finally rendered via OpenGL. The ...
Danimator's user avatar
0 votes
2 answers
176 views

Options to achieve parallel execution in C#

I have a use case where I need to process n number of operations, which involves other I/O operations. Method 1: Uses ConcurrentBag<T>. But worried that the I/O operations in the ...
Bobby Jose's user avatar
0 votes
0 answers
84 views

Why is my OpenMP based Code not getting any speedup?

I am trying to fill in "valid points" into a vector of vectors and I do it with the use of local vector of vector which I then merge. I also write the time measuring strategy for ...
tricostume's user avatar
1 vote
1 answer
218 views

OpenCL 1.2: Global memory consistency surrounding atomic operations?

I'm trying to implement global synchronization in OpenCL 1.2 using atomics and was wondering if there's any way to ensure that reads from different work groups (that provably -- by the logic of the ...
Danimator's user avatar

15 30 50 per page
1
2 3 4 5
54