[xwiki-devs] [Vote] Move the caches files to permdir and make the launch of XWiki faster
Hi. Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin. Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important). Some actions can be done to make the launch quicker: 1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource). Note that this behaviour can easily be changed by modifying a config file: http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat... 2 - During the build of XE, run an integration test that performs a simple view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache. Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer. I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster. The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean. Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job. So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster Here is my +1. Thanks, [1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2] http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl... -- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project
Hi, 1. +1 in order to avoid conflicts (and hard to debug problems) between multiple instances started on the same machine and all writing to the tmp folder, like it is now. 2. +1, otherwise it invalidates the idea of a "cache" (at least at startup). We don`t want to encourage people restarting XWiki to magically fix problems, it's not M$ Windows :) Instead, we could recommend cleaning the cache folder, just like we do for Solr, more or less. 3. -0 This would only be useful for testing the jetty/HSQLDB product. However, it might not be useful in our ITs which start custom XWiki instances that can not really reuse the generated cache from the standard distribution (maybe they could, but there is also a chance of introducing bugs this way). Another thing we could try is to asynchronously start the cache building process in a background thread, during XWiki's startup, then handle other startup tasks (solr, databases, etc.) in the main thread, then finally synchronize back with the cache building thread just before finishing the startup process and showing the UI. WDYT? Thanks, Eduard On Thu, Feb 12, 2015 at 6:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a simple view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Feb 13, 2015 11:22 AM, "Eduard Moraru" <[email protected]> wrote:
Hi,
1. +1 in order to avoid conflicts (and hard to debug problems) between multiple instances started on the same machine and all writing to the tmp folder, like it is now.
I haven't checked if this is true (I find it a bit strange) but in any case this is a reason to have separate temporary folders per instance, not a reason to put caches in the permanent directory. Thanks, Marius
2. +1, otherwise it invalidates the idea of a "cache" (at least at startup). We don`t want to encourage people restarting XWiki to magically fix problems, it's not M$ Windows :) Instead, we could recommend cleaning the cache folder, just like we do for Solr, more or less. 3. -0 This would only be useful for testing the jetty/HSQLDB product. However, it might not be useful in our ITs which start custom XWiki instances that can not really reuse the generated cache from the standard distribution (maybe they could, but there is also a chance of introducing bugs this way). Another thing we could try is to asynchronously start the cache building process in a background thread, during XWiki's startup, then handle other startup tasks (solr, databases, etc.) in the main thread, then finally synchronize back with the cache building thread just before finishing the startup process and showing the UI. WDYT?
Thanks, Eduard
On Thu, Feb 12, 2015 at 6:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Feb 13, 2015 11:22 AM, "Eduard Moraru" <[email protected]> wrote:
Hi,
1. +1 in order to avoid conflicts (and hard to debug problems) between multiple instances started on the same machine and all writing to the tmp folder, like it is now.
I haven't checked if this is true (I find it a bit strange) but in any case this is a reason to have separate temporary folders per instance, not a reason to put caches in the permanent directory. Thanks, Marius
2. +1, otherwise it invalidates the idea of a "cache" (at least at startup). We don`t want to encourage people restarting XWiki to magically fix problems, it's not M$ Windows :) Instead, we could recommend cleaning the cache folder, just like we do for Solr, more or less. 3. -0 This would only be useful for testing the jetty/HSQLDB product. However, it might not be useful in our ITs which start custom XWiki instances that can not really reuse the generated cache from the standard distribution (maybe they could, but there is also a chance of introducing bugs this way). Another thing we could try is to asynchronously start the cache building process in a background thread, during XWiki's startup, then handle other startup tasks (solr, databases, etc.) in the main thread, then finally synchronize back with the cache building thread just before finishing the startup process and showing the UI. WDYT?
Thanks, Eduard
On Thu, Feb 12, 2015 at 6:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi Guillaume, 1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose. 2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue. wdyt ? On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a simple view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO
On a related notes, we've discovered issues a few months ago on our XWiki 3.5 where the temp files were on some default temporary directory (as is described wishable here by Denis). Curriki servers are typically long-lived (a few weeks) and thus the OS maintenance can kick in and, that's exactly what happened: the temporary directory (I think it was somewhere on /var/tmp) got emptied after a while and that lead the /download/ handler to raise an exception because it did not expect the temp files to be deleted. We managed to find out why it was deleted and neutralized that. So, Denis, I think it is rather a good idea to have cached files in a non-temporary directory if you want to avoid such conflicts. paul On 13/02/15 19:39, Denis Gervalle wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose. 2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a simple view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Feb 13, 2015 11:21 PM, "Paul Libbrecht" <[email protected]> wrote:
On a related notes, we've discovered issues a few months ago on our XWiki
3.5 where the temp files were on some default temporary directory (as is described wishable here by Denis). Curriki servers are typically long-lived (a few weeks) and thus the OS maintenance can kick in and, that's exactly what happened: the temporary directory (I think it was somewhere on /var/tmp) got emptied after a while and
that lead the /download/ handler to raise an exception because it did not expect the temp files to be deleted.
This is/was a bug, not a reason to put caches in the permanent directory. XWiki should start and work without the (contents of the) permanent directory so a missing temporary file should not be a problem either. Thanks, Marius
We managed to find out why it was deleted and neutralized that.
So, Denis, I think it is rather a good idea to have cached files in a
non-temporary directory if you want to avoid such conflicts.
paul
On 13/02/15 19:39, Denis Gervalle wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from
permanent
data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose. 2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Feb 13, 2015 8:39 PM, "Denis Gervalle" <[email protected]> wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose.
I agree with Denis. Caches are temporary files for me, but temporary doesn't mean they have to be deleted after each restart. Thanks, Marius
2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
As I discussed with Guillaume before he send the proposal (but he felt it was to much for his need) the best IMO is to add the concept cache directory in Environment and conf file. It's not temp files and it's not really permanent files either. Basically I want to do that since a while now mostly because I would like to be able to setup the Debian package by default to put those files in /var/cache/xwiki/. On Sat, Feb 14, 2015 at 7:13 AM, Marius Dumitru Florea <[email protected]> wrote:
On Feb 13, 2015 8:39 PM, "Denis Gervalle" <[email protected]> wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose.
I agree with Denis. Caches are temporary files for me, but temporary doesn't mean they have to be deleted after each restart.
Thanks, Marius
2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Sat, Feb 14, 2015 at 9:44 AM, Thomas Mortagne <[email protected]> wrote:
As I discussed with Guillaume before he send the proposal (but he felt it was to much for his need) the best IMO is to add the concept cache directory in Environment and conf file. It's not temp files and it's not really permanent files either. Basically I want to do that since a while now mostly because I would like to be able to setup the Debian package by default to put those files in /var/cache/xwiki/.
Does it goes almost there already since /var/lib/tomcat7/work is a symlink to /var/cache/tomcat7 ? Of course I fully agree it would be cleaner and easier to have a configurable directory in xwiki.propertie. Even for the temporary directory, which is not really convenient to override in context.xml. Having all paths next too each other in the configuration would be far better IMO.
On Sat, Feb 14, 2015 at 7:13 AM, Marius Dumitru Florea <[email protected]> wrote:
On Feb 13, 2015 8:39 PM, "Denis Gervalle" <[email protected]> wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose.
I agree with Denis. Caches are temporary files for me, but temporary doesn't mean they have to be deleted after each restart.
Thanks, Marius
2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1]
https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache
[2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO
On Sat, Feb 14, 2015 at 11:46 AM, Denis Gervalle <[email protected]> wrote:
On Sat, Feb 14, 2015 at 9:44 AM, Thomas Mortagne <[email protected]> wrote:
As I discussed with Guillaume before he send the proposal (but he felt it was to much for his need) the best IMO is to add the concept cache directory in Environment and conf file. It's not temp files and it's not really permanent files either. Basically I want to do that since a while now mostly because I would like to be able to setup the Debian package by default to put those files in /var/cache/xwiki/.
Does it goes almost there already since /var/lib/tomcat7/work is a symlink to /var/cache/tomcat7 ?
The point here is to not mix temporary and cache stuff. For example I would move SOLR index in cache too since that's what it is in practice.
Of course I fully agree it would be cleaner and easier to have a configurable directory in xwiki.propertie. Even for the temporary directory, which is not really convenient to override in context.xml. Having all paths next too each other in the configuration would be far better IMO.
On Sat, Feb 14, 2015 at 7:13 AM, Marius Dumitru Florea <[email protected]> wrote:
On Feb 13, 2015 8:39 PM, "Denis Gervalle" <[email protected]> wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose.
I agree with Denis. Caches are temporary files for me, but temporary doesn't mean they have to be deleted after each restart.
Thanks, Marius
2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1]
https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache
[2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Sat, Feb 14, 2015 at 10:44 AM, Thomas Mortagne <[email protected]
wrote:
As I discussed with Guillaume before he send the proposal (but he felt it was to much for his need) the best IMO is to add the concept cache directory in Environment and conf file. It's not temp files and it's not really permanent files either.
+1 to that reasoning. Thanks, Eduard
Basically I want to do that since a while now mostly because I would like to be able to setup the Debian package by default to put those files in /var/cache/xwiki/.
On Sat, Feb 14, 2015 at 7:13 AM, Marius Dumitru Florea <[email protected]> wrote:
On Feb 13, 2015 8:39 PM, "Denis Gervalle" <[email protected]> wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose.
I agree with Denis. Caches are temporary files for me, but temporary doesn't mean they have to be deleted after each restart.
Thanks, Marius
2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1]
https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache
[2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Sun, Feb 15, 2015 at 2:09 AM, Eduard Moraru <[email protected]> wrote:
On Sat, Feb 14, 2015 at 10:44 AM, Thomas Mortagne <[email protected]
wrote:
As I discussed with Guillaume before he send the proposal (but he felt it was to much for his need) the best IMO is to add the concept cache directory in Environment and conf file. It's not temp files and it's not really permanent files either.
+1 to that reasoning.
+1 too, Thanks, Marius
Thanks, Eduard
Basically I want to do that since a while now mostly because I would like to be able to setup the Debian package by default to put those files in /var/cache/xwiki/.
On Sat, Feb 14, 2015 at 7:13 AM, Marius Dumitru Florea <[email protected]> wrote:
On Feb 13, 2015 8:39 PM, "Denis Gervalle" <[email protected]> wrote:
Hi Guillaume,
1) -1, this break the FHS which definitely separate caches from permanent data, and for a couple of good reason, you may want to put them on different partition, using faster disk, or even in memory disk. So I do not find very clever to put all cache files into the permanent directory. What would be the purpose of a temporary directory if it was not for that purpose.
I agree with Denis. Caches are temporary files for me, but temporary doesn't mean they have to be deleted after each restart.
Thanks, Marius
2) +1, but with some way to force the purge, so annoying problem still get a solution 3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1]
https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache
[2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
2015-02-13 19:39 GMT+01:00 Denis Gervalle <[email protected]>:
Hi Guillaume,
3) +1, it would be very helpful to have faster startup when testing. I would not put the file into the cache in the distribution, but in a skin folder or something, and it could simply copy the file in place of generating it for the default skin. So this could work on any distribution, and it could also solve your temporary folder issue.
wdyt ?
I still need to generate this file by an XWiki instance. Otherwise, doing what you suggest is not enough. If the user change the color theme, then this file must be deleted because it won't be relevant anymore. In other words, it is re-implementing a cache mechanism that already exists. So I'm -1 for this.
On Thu, Feb 12, 2015 at 5:55 PM, Guillaume "Louis-Marie" Delhumeau < [email protected]> wrote:
Hi.
Currently, XWiki is quite long to start, and this is mainly because of the LESS compiler which generates the CSS file of the skin.
Fortunately, we cache the results of the compilation in the LESS cache, which is stored in the file-system (this is important).
Some actions can be done to make the launch quicker:
1 - Not purge the cache at startup. The idea is to keep the cache of the previous launch of XWiki, so LESS would have nothing to compile anymore. This does not solve the first launch issue, but it is a great progress anyway. The disadvantage of this is that restarting XWiki will not solve any issue related to a bad cached file (ex: a buggy CSS file stored in the cache will still be there after a restart. The only way to fix this is to re-save the buggy LESS resource).
Note that this behaviour can easily be changed by modifying a config file:
http://extensions.xwiki.org/xwiki/bin/view/Extension/LESS+Module#HCacheStrat...
2 - During the build of XE, run an integration test that performs a
simple
view request to XWiki in order to make the LESS compiler builds the CSS file and pushes it into the cache. After the integration test, we just copy the generated LESS cache file into the Jetty/HSQLDB distribution, and so when you launch XWiki from this distribution, you use the pre-generated cache.
Of course it could only work for our Jetty distributions that users test locally. It will not solve the issue on production servers. But it is already good that a user have a good impression by starting XWiki quickly on her computer.
I have made a proof of concept on a branch [1] and the thing is working well. The first request to XWiki is really faster.
The only blocking point I have now is that the current cache directory is currently configured to be the temporary directory. Instead, I need to use a directory from the distribution (where I can put my pre-generated cache files). I have solved this locally by setting an absolute path to my "data" folder [2], but it is not clean.
Thomas suggested me to configure all the caches to use the "permdir" directory, which actually is the "data" directory in the case of our jetty distributions, and so it does the job.
So the vote is for the following proposal: 1 - move the cache files to permdir 2 - do not purge the LESS cache at startup (by default) 3 - add a new module that pre-generate the LESS cache file to make the first XWiki launch faster
Here is my +1.
Thanks,
[1] https://github.com/xwiki/xwiki-enterprise/compare/feature-datalesscache [2]
http://jira.xwiki.org/browse/XWIKI-10879?focusedCommentId=85369&page=com.atl...
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Denis Gervalle SOFTEC sa - CEO _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Guillaume Delhumeau ([email protected]) Research & Development Engineer at XWiki SAS Committer on the XWiki.org project
participants (6)
-
Denis Gervalle -
Eduard Moraru -
Guillaume "Louis-Marie" Delhumeau -
Marius Dumitru Florea -
Paul Libbrecht -
Thomas Mortagne