You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Results for files under node_modules are not sorted by their folder, jasmine-focused, then underscore-plus, then grunt. Would have expected the results from the grunt folder be first.
I remember having this discussion about performance and sorting. If we have to sort than we can't iteratively return results which will have a dramatic perceived impact on large codebases (no results until the last result is found and sorted).
We could maybe sort them as they are rendered? Or as they enter the model? Binary search -> insert. Shouldnt be crazy bad. But I still dont want to do it :p
In any case, the task breaks them up into chunks of paths. And as the paths are searched, it emits results. So there might have to be something in the scandal task that doesnt emit a result until all the other previous paths have been searched.
There are async parts throughout, and at any point, they can become unsorted. I think the best place to do this would be in the ResultsModel and sort as they come in. But then the results view's partial rendering becomes more complex, and results might pop into view.
I don't mind giving this a shot. I think it might make things less complex
if we use ReadDirSync, the tradeoff is that results will probably come in
slower.
In any case, the task breaks them up into chunks of paths. And as the
paths are searched, it emits results. So there might have to be something
in the scandal task that doesnt emit a result until all the other previous
paths have been searched.
There are async parts throughout, and at any point, they can become
unsorted. I think the best place to do this would be in the ResultsModel
and sort as they come in. But then the results view's partial rendering
becomes more complex, and results might pop into view.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/64#issuecomment-27515778
.
I would definitely prefer sorted results. So much so that this very issue caused me to switch back to Sublime 3 after giving Atom a go and liking a ton of what I saw.
Simplest way to explain why it's preferable: I love to know whether the results are under lib/ or spec/, for instance...
I have a rails app with precompiled assets, and when I search, the precompiled css files always come first(public/assets/*), the scss files I want to edit are always at the bottom(app/assets/*)(or even not shown sometimes), which makes it unbearable. I hacked together a way to sort the results in ResultsModel but it had to wait til after all the search is done to sort, and then render. It obviously takes ages which is far from ideal, but still better than the not sorted results for me.
EDIT I started ignoring results from public/assets, but in those situations I'd still prefer to have results from app/assets come before app/views.
Yes, the results are ALMOST sorted on my system, which is worse than being completely random. It really looks like all results in /lib are grouped together, and all results in /spec are grouped together so, even though I know they're not, I'll often miss a result when it ends up in the middle of something else.
I'd take slowness over bizarre sort any day. If speed is an issue, shelling out to a native program is an option?
Activity
benogle commentedon Oct 31, 2013
Yeah, the paths arent sorted by scandal and they are rendered as they come back. If we want to sort them, Maybe the best place is in the
ResultsModel?kevinsawicki commentedon Oct 31, 2013
Sounds good, although I would have thought that
scandalresults would be ordered since itreaddirreturns things in order.benogle commentedon Oct 31, 2013
Yeah, but there are async things going on. I assume it is hard to keep order when things are processed and displayed as they become available.
Honestly, I'd like to avoid sorting for performance and complexity if possible. Did it not being sorted throw you off?
kevinsawicki commentedon Oct 31, 2013
It did throw me off, I expected it to be ordered like the tree-view and fuzzy-finder.
mcolyer commentedon Oct 31, 2013
I remember having this discussion about performance and sorting. If we have to sort than we can't iteratively return results which will have a dramatic perceived impact on large codebases (no results until the last result is found and sorted).
benogle commentedon Oct 31, 2013
We could maybe sort them as they are rendered? Or as they enter the model? Binary search -> insert. Shouldnt be crazy bad. But I still dont want to do it :p
kevinsawicki commentedon Oct 31, 2013
How is performance improved by not being sorted?
If I run
find .it returns results really fast sorted.mcolyer commentedon Oct 31, 2013
After talking to @kevinsawicki for a second, I realized I was confusing streaming/sorting. @benogle if you switched scandal to use
readDirSyncinstead ofreadDir(https://github.com/atom/scandal/blob/e599f22af6296e04499f879dc3aba681a3ded35e/src/path-scanner.coffee#L23) is there a large performance impact?benogle commentedon Oct 31, 2013
I'm not sure. My main concern is complexity.
In any case, the task breaks them up into chunks of paths. And as the paths are searched, it emits results. So there might have to be something in the scandal task that doesnt emit a result until all the other previous paths have been searched.
There are async parts throughout, and at any point, they can become unsorted. I think the best place to do this would be in the ResultsModel and sort as they come in. But then the results view's partial rendering becomes more complex, and results might pop into view.
probablycorey commentedon Nov 4, 2013
I don't mind giving this a shot. I think it might make things less complex
if we use ReadDirSync, the tradeoff is that results will probably come in
slower.
On Thu, Oct 31, 2013 at 12:05 PM, Ben Ogle [email protected] wrote:
tmornini commentedon Apr 25, 2014
Yes, please! :-)
I would definitely prefer sorted results. So much so that this very issue caused me to switch back to Sublime 3 after giving Atom a go and liking a ton of what I saw.
Simplest way to explain why it's preferable: I love to know whether the results are under lib/ or spec/, for instance...
muan commentedon May 19, 2014
Would really love to see this. + 💯
I have a rails app with precompiled assets, and when I search, the precompiled css files always come first(
public/assets/*), the scss files I want to edit are always at the bottom(app/assets/*)(or even not shown sometimes), which makes it unbearable. I hacked together a way to sort the results inResultsModelbut it had to wait til after all the search is done to sort, and then render. It obviously takes ages which is far from ideal, but still better than the not sorted results for me.EDIT I started ignoring results from
public/assets, but in those situations I'd still prefer to have results fromapp/assetscome beforeapp/views.bronson commentedon May 24, 2015
Yes, the results are ALMOST sorted on my system, which is worse than being completely random. It really looks like all results in /lib are grouped together, and all results in /spec are grouped together so, even though I know they're not, I'll often miss a result when it ends up in the middle of something else.
I'd take slowness over bizarre sort any day. If speed is an issue, shelling out to a native program is an option?