Comment 44 for bug 1672139

Revision history for this message
In , Mak77 (mak77) wrote :

(In reply to fluks from comment #39)
> In a bug related to this, someone was thinking about efficiency. Does it matter if you add a button or a context menu item, then finding the path needs to be done only for that one bookmark when the user requests it. SQLite has had `WITH RECURSIVE` since 3.8.3, so you don't have to do recursion in code anymore.

Yes, it is possible to add a contextual menu to Open Enclosing Folder using WITH RECURSIVE, though opening the target folder in the Library window may not be trivial (should be feasible anyway, one has to navigate the result and open containers accordingly to the path, then select the given bookmark). It would be nicer if we'd have a quick way of extracting path for each bookmark in a performant way, but it's not strictly necessary for this specific contextual menu option. I'd be ok extending PlacesUtils.bookmarks.fetch to also fetch the path of a bookmark if a specific option is passed into it (so, on demand).
At this time we don't have the development resources to do it, so it's up to the community, if you want to contribute patches we can discuss a plan.