almgong / NDNOverWifiDirect

1 stars 0 forks source link

Performance Refactoring #24

Open almgong opened 7 years ago

almgong commented 7 years ago
almgong commented 7 years ago

First point resolved using ScheduledThreadPoolExecutor in 5af9a33.

almgong commented 7 years ago

Ideally, all tasks should eventually get converted to runnables, and the thread pool executor should be invoked. This way we can actually limit the number of threads created during operation.However tasks such as registering prefixes should NOT be a runnable, as they may never terminate or will do so after a long time. Tasks that are short lived, such as the FaceCreateTask are prime targets for this refactoring.