5 ms·
(I worked on this.) Give it a shot and let us know what you think! Where can we improve it?
by 100k 5y ago
(I worked on this.)
Give it a shot and let us know what you think! Where can we improve it?
- beltsazar 5y agoWhat kind of indexes do you use to provide regex searches?
- johndough 5y agoToday I wanted to search for "strstr[a-z]+?_r" but got the error message "This is a partial result set. The search was stopped early because it would take too long to check every file for this regular expression.". However, I got results for the less restrictive regex "strstr.+?_r" which is weird since I'd expect that it would be easier to return results for more restrictive regular expressions. Not sure if there is a perfect solution for this, but in many cases, you could probably search for the less restrictive version and filter the results with the more restrictive one after that. Also it would be great if more repositories were indexed. How do things work behind the scenes? Maybe it is possible to build a more memory-efficient index just for exact string search, which probably make up most searches. Anyway, this website is amazing and I use it quite often. Thank you a lot for working on this!
- 100k 5y agoThanks for the feedback, we're working on some changes to improve regular expression performance. We're also working hard to increase the number of repositories indexed. :)
- olafurpg 5y agoYou can search for that regular expression on Sourcegraph (disclaimer: I work there) https://sourcegraph.com/search?q=context:global+strstr%5Ba-z%5D%2B%3F_r&patternType=regexp&case=yes https://sourcegraph.com/search?q=context:global+strstr%5Ba-z...
- johndough 5y agoNice! Which repositories are indexed? Some feedback: * Copy & Paste does not work. When trying to select text from code snippets, the code is dragged like an image instead of being selected. * The GitHub icon during search is not clickable. Clicking to the right of the GitHub icon does not go to GitHub but instead shows an embedded view of that repository. There, the GitHub icon somewhere on the right is a bit hard to find (maybe write "View on GitHub" next to it so it is discoverable with Ctrl + F?), but at least it is clickable.
- dstaheli 5y agoThanks for this feedback, johndough. The copy & paste problem is likely a bug that only happens with Firefox and we'll fix it. More details here: https://github.com/github/feedback/discussions/8567 https://github.com/github/feedback/discussions/8567