Page 1 of 1

How to limit number of capabilities to save memory

Posted: Fri May 11, 2012 10:46 am
by stefan66
Hi,

I'm doing some tests and I only want to check on the resolution_width and resolution_height attributes.

In order to save memory (I suppose) how can I limit the load to only those 2 attributes ?

If have following code :

Code: Select all

        GeneralWURFLEngine wurflHolder;
        String mainPath = "C:\\Install\\jquerymobile\\wurfl-2.3.1.zip";
        String patchesPath = "";
        if (!StringUtils.isEmpty(patchesPath)) {
                String[] patchesPathArray = StringUtils.split(patchesPath, " ,");
                wurflHolder = new GeneralWURFLEngine(mainPath, patchesPathArray);
        } else {
                wurflHolder = new GeneralWURFLEngine(mainPath);
        }  
		// force WURFL to initialize immediately
		wurflHolder.getWURFLManager().getDeviceForRequest("");        
But this loads all attributes...

Regards,

Re: How to limit number of capabilities to save memory

Posted: Fri May 11, 2012 11:21 am
by kamermans
Hi,

We are currently evaluating adding this feature to all the APIs (loading only certain capabilities), but currently it only exists in the Database API (a feature called Capability Filter). You can also strip out the unnecessary capabilities and create a smaller WURFL file using something like the WURFL Customizer.