Comments (3)
Can you profile it for me?
I'm sorry I'm not going to be able to help with anything Windows-specific - I just don't know anything about it.
from concurrent-ruby.
It is faster today, probably because of a cache, I've also checked the code and could only find one windows specific part, which doesn't seem to be an issue.
It might just be "require" itself , which is known to be slower on windows.
require 'ruby-prof'
result = RubyProf.profile do
require 'concurrent'
end
printer = RubyProf::FlatPrinter.new(result)
printer.print(File.open("ruby_prof_example_api1_profile.txt", "w+"))
Measure Mode: wall_time
Thread ID: 80
Fiber ID: 60
Total: 0.581108
Sort by: self_time
%self total self wait child calls name location
68.93 0.567 0.401 0.000 0.167 295 *Kernel#gem_original_require
17.81 0.104 0.104 0.000 0.000 3629 <Class::File>#file?
2.66 0.016 0.015 0.000 0.000 6 *Kernel#require_relative
2.15 0.013 0.013 0.000 0.000 105 <Class::File>#exist?
1.38 0.121 0.008 0.000 0.113 2281 *Array#any?
0.68 0.004 0.004 0.000 0.000 1323 <Class::File>#join
0.50 0.003 0.003 0.000 0.000 3626 String#+
0.44 0.003 0.003 0.000 0.000 75 Module#class_eval
0.36 0.147 0.002 0.000 0.145 1060 Gem::BasicSpecification#contains_requirable_file? C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/basic_specification.rb:72
0.35 0.128 0.002 0.000 0.126 1060 Gem::BasicSpecification#have_file? C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/basic_specification.rb:332
0.35 0.581 0.002 0.000 0.579 294 *Kernel#require <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:36
0.35 0.002 0.002 0.000 0.000 4119 Gem::StubSpecification#data C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/stub_specification.rb:108
0.29 0.003 0.002 0.000 0.002 1975 Gem::StubSpecification#extensions C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/stub_specification.rb:168
0.25 0.016 0.001 0.000 0.015 1060 Gem::StubSpecification#missing_extensions? C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/stub_specification.rb:143
0.24 0.153 0.001 0.000 0.152 63 *Array#each
0.24 0.001 0.001 0.000 0.000 2151 Kernel#tap <internal:kernel>:89
0.23 0.004 0.001 0.000 0.002 1062 Gem::BasicSpecification#have_extensions? C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/basic_specification.rb:330
0.21 0.001 0.001 0.000 0.000 3 File#flock
0.13 0.002 0.001 0.000 0.001 1060 Gem::StubSpecification#raw_require_paths C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/stub_specification.rb:139
0.13 0.002 0.001 0.000 0.001 1068 Gem::StubSpecification#full_name C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/stub_specification.rb:179
0.10 0.001 0.001 0.000 0.000 1975 Gem::StubSpecification::StubLine#extensions
0.10 0.002 0.001 0.000 0.001 3 Kernel#eval
0.10 0.001 0.001 0.000 0.000 1065 <Module::Gem>#suffixes C:/Ruby31-x64/lib/ruby/3.1.0/rubygems.rb:944
0.10 0.001 0.001 0.000 0.000 238 IO#set_encoding
0.08 0.000 0.000 0.000 0.000 2011 Array#empty?
0.07 0.000 0.000 0.000 0.000 1060 Gem::StubSpecification#default_gem? C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/stub_specification.rb:93
0.07 0.000 0.000 0.000 0.000 942 Kernel#respond_to?
0.06 0.001 0.000 0.000 0.000 294 <Module::Gem>#find_unresolved_default_spec C:/Ruby31-x64/lib/ruby/3.1.0/rubygems.rb:1219
0.06 0.000 0.000 0.000 0.000 3 IO#read
0.05 0.000 0.000 0.000 0.000 1088 BasicObject#!
0.05 0.000 0.000 0.000 0.000 1068 Gem::StubSpecification#gems_dir
0.05 0.000 0.000 0.000 0.000 411 Hash#[]
0.05 0.000 0.000 0.000 0.000 1384 Module#method_added
0.05 0.000 0.000 0.000 0.000 1060 Gem::StubSpecification::StubLine#require_paths
0.04 0.000 0.000 0.000 0.000 1068 Gem::StubSpecification::StubLine#full_name
0.04 0.000 0.000 0.000 0.000 22 Module#attr_reader
0.03 0.000 0.000 0.000 0.000 20 Gem::Version#<=> C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/version.rb:347
from concurrent-ruby.
The top two make it seem like an IO issue? Are you one some kind of strange machine, or a virtualised machine?
This isn't likely to be a Concurrent Ruby issue, so I'm closing unless there is evidence otherwise. I'm happy to keep engaging with you here to try to help as best I can though.
from concurrent-ruby.
Related Issues (20)
- why use wait_for_termination method will stuck the code HOT 2
- DaemonThreadFactory creating new Java thread factory each time it creates a new thread HOT 8
- `Concurrent::Promises::Future#value!` can return `nil` even when promise is not resolved yet HOT 6
- Version 1.2.2 crashes with Segmentation fault HOT 3
- Fiber.new causes SEGV when using Ruby 3.3.0 on Rails 7.1.2 in M1 Mac Docker environment HOT 5
- Segfault in lock_local_var.rb on aarch64 HOT 3
- [REDIRECT] Segfault on Ruby 3.3.0 on linux-aarch64? See https://bugs.ruby-lang.org/issues/20085
- Add new CI job with RUBY_MN_THREADS=1 HOT 4
- Add API to prestart threads in threadpools HOT 4
- Don't know how to build task 'parallel_spec' HOT 2
- Segmentation fault related to concurrent-ruby HOT 4
- Segmentation fault with Ruby 3.3.0 running with Docker HOT 1
- Add keyword arguments to async HOT 1
- ThreadPoolExecutor#shutdown? inconsistency in JRuby and C Ruby HOT 4
- test failure due to "uninitialized constant Concurrent::CAtomicReference" HOT 7
- CAtomicFixnum should probably be a private constant HOT 1
- support re-raising exceptions when shutting down a timertask HOT 4
- v1.2.0 release notes do not mention that RubyThreadLocalVar class was removed HOT 8
- NameError: uninitialized constant Concurrent::RubyThreadLocalVar HOT 1
- The Concurrent::Map default_proc is passed a Concurrent::Hash instead of the Concurrent::Map HOT 8
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 concurrent-ruby.