How to get better performance while OpenEars is running

Home Forums OpenEars How to get better performance while OpenEars is running

Viewing 1 post (of 1 total)

  • Author
    Posts
  • #1031867
    warpling
    Participant

    For a long time I’ve accepted that running OpenEars on the main thread leads to a degradation of real time performance/interaction of things like animations and gesture recognizers. So I’m a bit embarrassed to admit I discovered years later that throwing OpenEar tasks on a serial background thread with lower quality of service (QoS) leads to huge performance gains on the main thread of things like gesture recognizers. Anyway, just wanted to share in case it could help anyone else! I couldn’t find anything like this when I searched the forums previously.

    
        dispatch_queue_attr_t qosAttribute = dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL, QOS_CLASS_DEFAULT, 0);
        dispatch_queue_t speechProcessingQueue = dispatch_queue_create("SpeechProcessingOutputQueue", qosAttribute);
    
        dispatch_async(speechProcessingQueue, ^{
        // OpenEars code
        });
    

    Cheers
    ~Ryan

    • This topic was modified 3 years, 1 month ago by warpling.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.