I am working on creating a pull request for this. The idea is to reuse the webkit remote debug interface that appium already uses. When the desiredCapabilities has {loggingPreferences : {performance: 'ALL'} }, Timeline.start shall be called in the remote debugging.
We would then listen to eventRecorded event and save the events in a buffer.
Everytime the user calls getLog('performance'), the buffer is returned and flushed.
This is how ChromeDriver's log('performance') is implemented.
The only problem I see with this approach is an overflow of buffer, bu we could restrict the count of events in the buffer.