View Single Post
  #1   Spotlight this post!  
Unread 11-10-2016, 23:25
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 259
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: FRC code search: a great project for someone to start

Quote:
Originally Posted by euhlmann View Post
Or use an actual database engine's full text search, which should be far more efficient.


Btw, when I tried searching for usages of WPILib classes with my mongo/node implementation, I found more than a few top results being the source for that WPILib class, since it seems many teams like to keep entire copies of WPILib in their repos. I wonder if there's a way to filter those out.
Git grep is actually quite fast, and way more space efficient than most database engines. Most database engines don't have paging sizes large enough for an entire source file, and so you're left with subpar lookup speeds as compared to git grep that can directly look through the changes to files. Obviously this needs some testing, but this is the theory behind it anyway.

Git grep also has the advantage that you can call it with `git rev-list --all` to search for occurrences of a string over all commits, ever. Likewise, you can grep subdirectories, discounting any directories that resemble that of the wpilib source.
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote