Re: [Dev] Optimize file read operation in Jaggery

2014-08-21 Thread Ishara Cooray
Hi,

Thanks for the replies.

It's a 2.2 kB configuration file. And it will not grow by the time.
So caching in memory will not be a big issue.

Found that it can be stored in application context.

Jaggery documentation says,


   1. %
   2. //Putting a property to the application context
   3. application.put('bar', {'name':'jaggery'});
   4.
   5. print(
   6. //reading a property from application context
   7. application.get('bar')
   8. );
   9.
   10. //Removing a property from application context
   11. application.remove('bar');
   12. %


Hopefully i can use this.



Ishara Cooray
Senior Software Engineer
Mobile : +9477 262 9512
WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware


On Thu, Aug 21, 2014 at 10:08 AM, Waruna Perera waru...@wso2.com wrote:

 Hi,

 What about population your file data to temp db and access it and
 update/delete when needed?

 Thanks


 On Thu, Aug 21, 2014 at 1:23 AM, Udara Liyanage ud...@wso2.com wrote:


 Hi,

 If the file content is stored in memory, memory consumption would grow if
 it reads a big file or several files. How about using a cache of a fix
 size?

 What kind of files it would read multiple times, if they are
 configuration files only the important data could be stored in the memory.
 Could you please elaborate more of your task with an example in order to
 get a better understanding.

 Touched, not typed. Erroneous words are a feature, not a typo.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Waruna Perera
 Senior Software Engineer - Test Automation
 Mobile: +94 77 3867037
 WSO2, Inc.; http://wso2.com/
 lean . enterprise . middlewear.

___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Optimize file read operation in Jaggery

2014-08-20 Thread Udara Liyanage
Hi,

If the file content is stored in memory, memory consumption would grow if
it reads a big file or several files. How about using a cache of a fix
size?

What kind of files it would read multiple times, if they are configuration
files only the important data could be stored in the memory.
Could you please elaborate more of your task with an example in order to
get a better understanding.

Touched, not typed. Erroneous words are a feature, not a typo.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Optimize file read operation in Jaggery

2014-08-20 Thread Waruna Perera
Hi,

What about population your file data to temp db and access it and
update/delete when needed?

Thanks


On Thu, Aug 21, 2014 at 1:23 AM, Udara Liyanage ud...@wso2.com wrote:


 Hi,

 If the file content is stored in memory, memory consumption would grow if
 it reads a big file or several files. How about using a cache of a fix
 size?

 What kind of files it would read multiple times, if they are configuration
 files only the important data could be stored in the memory.
 Could you please elaborate more of your task with an example in order to
 get a better understanding.

 Touched, not typed. Erroneous words are a feature, not a typo.

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Waruna Perera
Senior Software Engineer - Test Automation
Mobile: +94 77 3867037
WSO2, Inc.; http://wso2.com/
lean . enterprise . middlewear.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Optimize file read operation in Jaggery

2014-08-19 Thread Ishara Cooray
Hi,

i want to optimize file read in jaggery application, which reads same file
several times.
However it is not recommended to store the content in the session.

Muduranga suggested that to store it in Application context.

Any suggestions would be appreciated.


Thanks  Regards,

Ishara Cooray
Senior Software Engineer

+9477 262 9512
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev