I'm currently developing MTP feature by using go-mtpfs.
During developmenet, I found the a issues about libusb_bulk_tranfer speed.
To receive and send MTP data between MTP device and Host, I use lib_usb_bulk_transfer like this.
func (h DeviceHandle) BulkTransfer(endpoint byte, data []byte, timeout int) (actual int, err error) {
var ptr byte
if len(data) > 0 {
ptr = &data[0]
}
var n C.int
e := C.libusb_bulk_transfer(h.me(), C.uchar(endpoint), (*C.uchar)(ptr),
C.int(len(data)), &n, C.uint(timeout))
return int(n), toErr(e)
}
Issue point is as follows.
If scan a folder containing a lot of files by using getObjectHandles, it takes about 5~10 seconds.
generally, it takes within one second to send a request and receive a response from MTP device.
I'm currently developing MTP feature by using go-mtpfs.
During developmenet, I found the a issues about libusb_bulk_tranfer speed.
To receive and send MTP data between MTP device and Host, I use lib_usb_bulk_transfer like this.
func (h DeviceHandle) BulkTransfer(endpoint byte, data []byte, timeout int) (actual int, err error) { var ptr byte if len(data) > 0 { ptr = &data[0] }
}
Issue point is as follows.
If scan a folder containing a lot of files by using getObjectHandles, it takes about 5~10 seconds. generally, it takes within one second to send a request and receive a response from MTP device.
this is issue or natural situation?