Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When openning a big folder accessibility is spammed #957

Open
alexarnaud opened this issue Mar 27, 2018 · 19 comments
Open

When openning a big folder accessibility is spammed #957

alexarnaud opened this issue Mar 27, 2018 · 19 comments

Comments

@alexarnaud
Copy link
Member

Expected behaviour

Caja shouldn't emit the event property-change when launching the folder for the first time, see this explanation from the Orca on the mailing list: https://mail.gnome.org/archives/orca-list/2018-March/msg00240.html

Actual behaviour

Caja emits one event property-change for each file in the folder, more file you've, more laggy Orca will be. On a folder with 1000 files, we've a lag of 10s.

Steps to reproduce the behaviour

  1. Open Accerciser (accessibility explorer)
  2. On the monitor events, check "object:property-change:accessible-name"
  3. Open Caja
  4. Enter on a big folder (with lot of files)

MATE general version

1.20.0

Package version

1.20.0-2

Linux Distribution

Debian

@alexarnaud alexarnaud changed the title When openning a big folder accessiblity is spammed When openning a big folder accessibility is spammed Mar 27, 2018
@alexarnaud
Copy link
Member Author

@raveit65 @monsta @lukefromdc @sc0w Do you know if we're using a customer icon view on Caja or if we're using GtkFlowBox? It seems Nautilus has been migrated to this but what's about Caja?

I've grep a bit in the source code but I'm unable to find the culprits events from the source code. Could you help me a bit?

Best regards,
Alex.

@lukefromdc
Copy link
Member

The GtkFlowBox is not used anywhere in Caja, a source directory search for that string returns no results. The canvas showing the icons is a custom widget-and that is one of the reasons GNOME dropped nautilus-desktop: they found it too hard to port to Wayland and wanted to drop it. Since GNOME devs don't use desktop icons, they don't want to do the work to support anyone else using them and just dropped the desktop from Nautilus. If they wanted to migrate away from the icon canvas that they called so complex, they could either do this, or special-case the desktop (already in a separate binary) to be the only window using it.

@alexarnaud
Copy link
Member Author

Hello @lukefromdc

I'm trying to help figuring out this issue, is the source code for displaying files in icon view is fm-icon-view.c ? What should be the function that display the files on the screen when entering inside a folder ? I assume somewhere a function call "fm_icon_view_add_file"
I only see that with grep:

src/file-manager/fm-icon-view.c:603:fm_icon_view_add_file (FMDirectoryView *view, CajaFile *file, CajaDirectory *directory)
src/file-manager/fm-icon-view.c:3165: fm_directory_view_class->add_file = fm_icon_view_add_file;

Best regards,
Alex.

@lukefromdc
Copy link
Member

Not sure at the moment: look at that file, eel-canvas.c , eel-canvas-rect-ellipse.c (maybe), caja-icon-canvas-item.c and related files.

@pvagner
Copy link

pvagner commented Apr 16, 2018

My guess would be that it might be an issue inherited from GTK plus as nautilus and GTK File Chooser seem to be also affected by this.

@monsta
Copy link
Contributor

monsta commented Apr 19, 2018

Well, we can try looking into older Nautilus code to see if this is fixed (before moving to that flow box, whatever it is).

@monsta
Copy link
Contributor

monsta commented Apr 19, 2018

@alexarnaud: I guess this affects not only 1.20 but earlier releases too?

@alexarnaud
Copy link
Member Author

alexarnaud commented Apr 19, 2018 via email

@alexarnaud
Copy link
Member Author

alexarnaud commented Apr 19, 2018 via email

@monsta
Copy link
Contributor

monsta commented Apr 20, 2018

So it indeed might be something in GTK+3 widget(s) on which custom icon view widget is based...

@alexarnaud
Copy link
Member Author

@monsta @lukefromdc If we add a bounty on such bug, would you be interesting to fix it even if it's in GTK itself? If yes, how many bounty do you think it is reasonable for such bug?

Best regards,
Alex.

@joanmarie
Copy link
Contributor

It turns out there's also an excessive number of children-changed events, so the problem is bigger than the name-change.

@lukefromdc
Copy link
Member

I don't know enough about this right now to work on it, and unless Bountysource reinstates physical checks going forward I expect to be unable to collect future bounties (no Paypal account) even if they special-case the surprise I got on the last bounty.

@joanmarie
Copy link
Contributor

joanmarie commented Apr 20, 2018

@lukefromdc mind taking a look at pull request #979. That solves the name-change spam. (Deciding how best to tackle the children-changed spam still remains.)

Edit: And/or @monsta.

@alexarnaud
Copy link
Member Author

alexarnaud commented Apr 21, 2018 via email

@monsta
Copy link
Contributor

monsta commented Apr 21, 2018

I don't know enough about this right now to work on it

Same for me. I don't know if bounty is going to attract some other developers who might fix this. But I guess it won't hurt.

@joanmarie
Copy link
Contributor

joanmarie commented Apr 21, 2018

And for the children-changed spam: pull request #981

@joanmarie
Copy link
Contributor

@alexarnaud regarding this:

Are you sure children-change is not relevant?

Where did I say that? In fact, that is the reason why I suggested here that it needs to be tackled and on the Orca list that this was a problem. Event floods are teh suck and there's only so much I can do in Orca to hack around this sort of problem. I just think one should do independent changes independently, hence the separate pull requests.

@joanmarie
Copy link
Contributor

Found another children-changed event flood coming from the icon container. Hopefully that's all of them.... Pull request #984 open for your consideration. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants