View Issue Details

IDProjectCategoryView StatusLast Update
15036Feature requests[All Projects] Otherpublic2019-07-16 10:58
ReporterolleharAssigned To 
PrioritynoneSeverity@50@ 
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary15036: Investigate how to use preloading in LS
Description

Info: https://stitcher.io/blog/preloading-in-php-74

Preloading can speed up loading of PHP framework etc.

TagsNo tags attached.

Activities

ollehar

ollehar

2019-07-08 13:18

administrator   ~52788

Ping @LouisGac, head of R&D department? ;)

ollehar

ollehar

2019-07-09 11:28

administrator   ~52796

@DenisChenu Busy?

DenisChenu

DenisChenu

2019-07-09 11:47

developer   ~52797

In my opinion : more server configuration, not LimeSurvey totally related …

Need opcache
Can be done with auto_prepend_file

ollehar

ollehar

2019-07-09 12:13

administrator   ~52799

No, you need PHP code to use it. See example in code:

$files = /* An array of files you want to preload */;

foreach ($files as $file) {
    opcache_compile_file($file);
}
ollehar

ollehar

2019-07-09 12:13

administrator   ~52800

Such a snippet could be used in our bootstrap entry script to load the Yii framework (index.php).

DenisChenu

DenisChenu

2019-07-09 14:34

developer   ~52811

auto_prepend_file can be used for this, to append the PHP code

ollehar

ollehar

2019-07-10 11:22

administrator   ~52820

Didn't know about that, interesting.

DenisChenu

DenisChenu

2019-07-16 09:28

developer   ~52896

@ollehar : maybe LS can offer the php file to be used because

  1. you can't do opcache.preload=/path/to/project/preload.php in LimeSurvey …
  2. you can't restart server when updating (we update rarely framework, but it's happen).
ollehar

ollehar

2019-07-16 10:55

administrator   ~52897

If it's possible to speed up LS with preloading, then it should absolutely be in the manual at least. Offer a PHP file sounds like a good idea.

You can restart nginx/apache via PHP, but only if the web user has sudo access (bad idea).

DenisChenu

DenisChenu

2019-07-16 10:58

developer   ~52898

web user has sudo access

Argl … I died in atrocious suffering …

Issue History

Date Modified Username Field Change
2019-07-08 13:17 ollehar New Issue
2019-07-08 13:18 ollehar Note Added: 52788
2019-07-08 13:39 ollehar Project Bug reports => Feature requests
2019-07-09 11:28 ollehar Note Added: 52796
2019-07-09 11:47 DenisChenu Note Added: 52797
2019-07-09 12:13 ollehar Note Added: 52799
2019-07-09 12:13 ollehar Note Added: 52800
2019-07-09 14:34 DenisChenu Note Added: 52811
2019-07-10 11:22 ollehar Note Added: 52820
2019-07-16 09:28 DenisChenu Note Added: 52896
2019-07-16 10:55 ollehar Note Added: 52897
2019-07-16 10:58 DenisChenu Note Added: 52898