This is a very small and very promising patch, but we would need to include the 
JNA library. The JNA library allows us to conveniently call native APIs without 
JNI code. We could use this for not only what this patch does - set background 
mode to significantly reduce system impact of our on-startup disk I/O - but 
also for setting thread priorities on unix, for which we currently have a 
native JNI library. And there may well be other things we'd like to call native 
libraries for too.

Also its platform detection code might well replace our existing code in that 
area - or at least some of it.

The catch is the library is 900KB, and the platform library (which I think just 
has some standard convenience functions) is 700KB. So we might be looking at 
increasing the download by 1.6MB.

Thoughts? I'm in favour but not totally convinced...

The original pull request (more info in attached messages):
https://github.com/freenet/fred-staging/pull/29
--- Begin Message ---
BELOW_NORMAL and IDLE are CPU priorities. BACKGROUND_MODE on the other hand 
affects mostly I/O priority and CPU latency. Basically it instructs the OS to 
treat the process as a non-interactive daemon/service.
The most important effect of this is that when freenet starts at boot, the disk 
I/O it generates doesn't impact the desktop responsiveness.
More info about this can be found on MSDN: 
http://msdn.microsoft.com/en-us/library/ms686277%28v=VS.85%29.aspx (read the 
description of THREAD_MODE_BACKGROUND_BEGIN and the remarks section)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/freenet/fred-staging/pull/29#issuecomment-1041558


--- End Message ---
--- Begin Message ---
As an example, on my system freenet reads over 2gb worth of data roughly within 
the first minute at boot (max store size is set to 50gb) and this greatly 
impact the overall responsiveness immediately after logon.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/freenet/fred-staging/pull/29#issuecomment-1041571


--- End Message ---

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Devl mailing list
[email protected]
http://freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to