lundi 25 janvier 2016

How can I avoid serving too many files on Karma server

I am using Karma as my unit test runner. Generally speaking, it is awesome, but I am facing some annoying problem.

The website I am developing on is based on a quite large ui library with about 40000 files. All the resource from the library is loaded on use, so I have to set them all as 'served' files on the Karma server. Thus I will frequently meet the EMFILE error, which means I am opening too many files at the same time.

Of course I can modify the open file maximum through ulimit -n, but this is not as graceful as I expected, and loading tens of thousands files is really time-consuming. Furthermore, I am going to work on a shared machine which I do not have root auth.

I am currently using another http-server and let Karma server proxy all the lib files to it, but it is only a temporary solution.

So I am wondering if there is any way to avoid including all the library files as 'served'?

Aucun commentaire:

Enregistrer un commentaire