D7230: Save up a bunch of stat() calls on application start

2017-09-01 Thread Aleix Pol Gonzalez
This revision was automatically updated to reflect the committed changes.
Closed by commit R263:555409eb206b: Save up a bunch of stat() calls on 
application start (authored by apol).

REPOSITORY
  R263 KXmlGui

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D7230?vs=17964&id=19046

REVISION DETAIL
  https://phabricator.kde.org/D7230

AFFECTED FILES
  src/khelpmenu.cpp

To: apol, #frameworks, dfaure, asturmlechner
Cc: ltoscano, aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-15 Thread Andreas Sturmlechner
asturmlechner accepted this revision.
asturmlechner added a comment.


  Briefly runtime tested it as well with and without translations, no issues.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure, asturmlechner
Cc: ltoscano, aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-15 Thread Andreas Sturmlechner
asturmlechner added a comment.


  Sounds fine.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure, asturmlechner
Cc: ltoscano, aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-15 Thread David Faure
dfaure added a comment.


  A minor "breakage" though, just a menu item that brings a selection of 0 or 1 
language, i.e. showing the user that no translation is available. Arguably 
that's actually better user interface than a missing menu item (A: "click on 
that menu item!" -- B: "where? you're dreaming, there's no such menu item!")

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure, asturmlechner
Cc: ltoscano, aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-15 Thread Andreas Sturmlechner
asturmlechner added a comment.


  Thanks for adding me, at least Gentoo indeed supports stripping translations 
even after they were moved into the packages - so that would break.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure, asturmlechner
Cc: ltoscano, aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread Luigi Toscano
ltoscano added a reviewer: asturmlechner.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure, asturmlechner
Cc: ltoscano, aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread Luigi Toscano
ltoscano added a comment.


  I would still ask distributions: some of them may strip the translations in 
some cases.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure
Cc: ltoscano, aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread Albert Astals Cid
aacid added a comment.


  In https://phabricator.kde.org/D7230#134452, @elvisangelaccio wrote:
  
  > In https://phabricator.kde.org/D7230#134391, @dfaure wrote:
  >
  > > That's one solution. The other is to add bool 
KLocalizedString::hasApplicationTranslations() which stops at the first 
translation found.
  > >
  > > Does the argument about shipping translations in tarballs apply to kmail, 
dolphin, etc. or just to KF5 and extragear? For apps, I thought only 
`releaseme` did that, is that used by the "Applications" product?
  >
  >
  > Yep, since Applications 17.04
  
  
  No, we do not use releaseme
  Yes, we do ship translations inside tarballs.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure
Cc: aacid, dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread David Faure
dfaure accepted this revision.
dfaure added a comment.
This revision is now accepted and ready to land.


  Ah, OK then.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks, dfaure
Cc: dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread Elvis Angelaccio
elvisangelaccio added a comment.


  In https://phabricator.kde.org/D7230#134391, @dfaure wrote:
  
  > That's one solution. The other is to add bool 
KLocalizedString::hasApplicationTranslations() which stops at the first 
translation found.
  >
  > Does the argument about shipping translations in tarballs apply to kmail, 
dolphin, etc. or just to KF5 and extragear? For apps, I thought only 
`releaseme` did that, is that used by the "Applications" product?
  
  
  Yep, since Applications 17.04

REPOSITORY
  R263 KXmlGui

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks
Cc: dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread David Faure
dfaure added a comment.


  That's one solution. The other is to add bool 
KLocalizedString::hasApplicationTranslations() which stops at the first 
translation found.
  
  Does the argument about shipping translations in tarballs apply to kmail, 
dolphin, etc. or just to KF5 and extragear? For apps, I thought only 
`releaseme` did that, is that used by the "Applications" product?
  
  Just wondering, I don't care much either way.

REPOSITORY
  R263 KXmlGui

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks
Cc: dfaure, elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread Elvis Angelaccio
elvisangelaccio added a comment.


  +1
  We bundle translations in tarballs almost everywhere now, so it's safe to 
assume that we have > 1 translations around.

REPOSITORY
  R263 KXmlGui

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks
Cc: elvisangelaccio, broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread Kai Uwe Broulik
broulik added a comment.


  Another idea would be to check it in `aboutToShow` of the menu?

REPOSITORY
  R263 KXmlGui

REVISION DETAIL
  https://phabricator.kde.org/D7230

To: apol, #frameworks
Cc: broulik


D7230: Save up a bunch of stat() calls on application start

2017-08-10 Thread Aleix Pol Gonzalez
apol created this revision.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  We are checking if every language known to us is present just to make
  sure that we have more than one and show the dialog entry.
  Always showing it is not a big deal and we'd save up this penalty at
  start.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D7230

AFFECTED FILES
  src/khelpmenu.cpp

To: apol, #frameworks