rjvbb added a comment.

  >     static const bool forceMoth = 
!qEnvironmentVariableIsEmpty("QV4_FORCE_INTERPRETER") ||
  >                                   
!OSAllocator::canAllocateExecutableMemory();
  >   
  >   That means on the first invocation that is cached for ever.
  
  Damn, I must have missed the `static`, I was certain that the check was 
performed each time. Wishful thinking, maybe.
  
  >   in the editor singleton on first instantiation and even then this only 
helps if no other part of the application did execute a script in advance.
  
  There must be a way to do this with a shared library initialisation routine 
that's executed when the library is loaded. I've used that feature on Mac and 
Linux and it's possible on MSWin too.
  
  The statement could be repeated in the editor singleton for cases where the 
library is deployed in a static build.
  
  Both approaches (and the combined approach) will be easier to implement than 
my current patch.
  
  >   And it will degenerate performance for the complete application if it 
works at all :/
  
  Lesser performance is always better than no ("fully degraded") performance at 
all, but apparently the penalty isn't so big. It's not noticeable for KTE 
scripts, and the Gentoo guys apparently deem it an acceptable trade-off as well.
  
  "Applications using KTextEditor won't support the fastest possible QML 
performance with older Qt versions". Sounds reasonable to me (and we could 
always document how to patch QtDeclarative to make that statement above 
non-static.)

REPOSITORY
  R39 KTextEditor

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

To: rjvbb, #frameworks
Cc: cullmann, kde-frameworks-devel, kevinapavew, demsking, head7, kfunk, sars, 
dhaumann

Reply via email to