<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15006</bug_id>
          
          <creation_ts>2023-01-13 08:04:11 +0000</creation_ts>
          <short_desc>Improve performance of the pkg_hash_fetch_best_installation_candidate function.</short_desc>
          <delta_ts>2023-01-13 08:04:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.6.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>next-patch</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alex Stewart">alex.stewart</reporter>
          <assigned_to name="Alex Stewart">alex.stewart</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94716</commentid>
    <comment_count>0</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2023-01-13 08:04:11 +0000</bug_when>
    <thetext>This enhancement request was moved from the project&apos;s `:TODO` file, and was originally authored by Graham Gower.

pkg_hash_fetch_best_installation_candidate() is linear search O(P*PN)
and is slow (frequently called).
    P provider
    PN pkgs in a provider

It can be O(P) if a hash table is used.

https://git.yoctoproject.org/opkg/tree/libopkg/pkg_hash.c?id=cee294e72d257417b5e55ef7a76a0fd15313e46b#n335</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>