≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #2129

Feature request #2129: Use map-reduce approach to make Command-T faster

Kind feature request
Product Command-T
When Created 2013-12-14T14:57:34Z, updated 2013-12-16T15:10:33Z
Status closed
Reporter Greg Hurrell
Tags no tags

Description

Command-T is mostly CPU-bound, and well suited to a map-reduce approach.

The matching algorithm matches and scores the set of paths in the search space, then sorts the result by score. It would be relatively straightforward to divvy up the search space across the CPU cores, then merge the lists and do the sort.

The only problem is that Ruby multithreading isn't real. This ticket, then, is to capture the idea of a branch in which we use POSIX threads to do this "outside" of Ruby. That means it won't work on Windows (which is why it must be a separate branch), and also that I might have to replace some of the internals with hand-coded data structures (don't want any use of Ruby objects like strings and arrays to potentially invoke garbage collection, which is basically certainly not thread-safe).

Not sure if this is viable, but wanted to note it down as a possibility before I forget it.

Comments

  1. Greg Hurrell 2013-12-14T15:06:13Z

    Some interesting notes on threading here:

    http://blog.phusion.nl/2010/06/10/making-ruby-threadable-properly-handling-context-switching-in-native-extensions/

  2. Greg Hurrell 2013-12-16T15:10:20Z

    Status changed:

    • From: new
    • To: closed
  3. Greg Hurrell 2013-12-16T15:10:33Z

    Marked as closed; 1.6 release has POSIX threading.

Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets