Comments (6)
they don't do anything special ... try doing .each
or calling .size
on the result to see if it's the process-to-process overhead
from parallel.
could try ractors ...
from parallel.
With .each
, on a subset of those JSON files (16 files) and after running repeatedly to warm the caches, I get 2.8 seconds with normal serial execution and 3.6 seconds with parallel
. So, the difference is not as drastic but still there. With ractors, I see similar decreased performance.
from parallel.
the only thing I could imagine doing that is disk io ...
maybe read the files into memory first and then start the blocks ?
(also make sure to return nil or the count from the blocks just in case)
from parallel.
For spinning disks, random access is relatively slower compared to linear scan. You are converting N linear scans into random access patterns across the same data volume by parallelizing.
Not sure if it's the same for SSDs, but any form of caching the hardware or OS do will be similarly affected.
from parallel.
I wonder if we could improve this by improving serialization speed when consolidating the objects produced by child processes by .map
?
from parallel.
Related Issues (20)
- Flaky test in ./spec/parallel_spec.rb:478
- Sidekiq integration HOT 3
- [Feature Request] Need access to the progress bar object HOT 2
- Rails 6.0.3: *** stack smashing detected *** HOT 3
- Process.fork is not supported by this Ruby HOT 7
- What is the recomended way to implement a semaphore or lock using this library? HOT 1
- The problem with Parallel Gem and The MySQL server is running with the --read-only HOT 2
- How is it to more simply using that ActiveRecord::Base.connection.reconnect? HOT 2
- About parallel connection logic HOT 1
- ZeroDivisionError: float division by zero HOT 1
- Sidekiq + Parallel performance issues HOT 1
- Hangs indefinitely when used with EventedFileUpdateChecker HOT 5
- Use '{}' can't concat string properly HOT 1
- parallel groupby HOT 1
- net_http_args nil class exception HOT 2
- Segmentation fault HOT 10
- [feature] finish_in_order - process finish hook in the original order HOT 7
- looking for more high level documentation HOT 1
- Ruby 3.5 to drop `win32ole` HOT 2
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 parallel.