You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are three queries in UdgerParser.cs that have no filters. This means that the same data (and all data) is selected from the DB every single time a detection is being made:
//clientDataTableclientRegex=dt.selectQuery(@"SELECT class_id,client_id,regstring,name,name_code,homepage,icon,icon_big,engine,vendor,vendor_code,vendor_homepage,uptodate_current_version,client_classification,client_classification_code FROM udger_client_regex JOIN udger_client_list ON udger_client_list.id = udger_client_regex.client_id JOIN udger_client_class ON udger_client_class.id = udger_client_list.class_id ORDER BY sequence ASC")
DataTableosRegex=dt.selectQuery(@"SELECT os_id,regstring,family,family_code,name,name_code,homepage,icon,icon_big,vendor,vendor_code,vendor_homepage FROM udger_os_regex JOIN udger_os_list ON udger_os_list.id = udger_os_regex.os_id ORDER BY sequence ASC")
DataTabledevice=dt.selectQuery(@"SELECT deviceclass_id,regstring,name,name_code,icon,icon_big FROM udger_deviceclass_regex JOIN udger_deviceclass_list ON udger_deviceclass_list.id=udger_deviceclass_regex.deviceclass_id ORDER BY sequence ASC")
Using the test database, these queries bring 141, 165 and 42 records respectively.
Given the fact that the DB is essentially read-only from the perspective of the Udger Client and that the same data is retrieved every time, I think that these records could be cached to avoid 3 DB roudtrips on every detection.
The text was updated successfully, but these errors were encountered:
clupasq
changed the title
Some queries could be cached for effieciency
Some queries could be cached for efficiency
Sep 8, 2016
There are three queries in UdgerParser.cs that have no filters. This means that the same data (and all data) is selected from the DB every single time a detection is being made:
Using the test database, these queries bring 141, 165 and 42 records respectively.
Given the fact that the DB is essentially read-only from the perspective of the Udger Client and that the same data is retrieved every time, I think that these records could be cached to avoid 3 DB roudtrips on every detection.
The text was updated successfully, but these errors were encountered: