I have a console application running on Linux (Ubuntu 12.04) that runs an intensive set of queries against a MySQL Server using the MYSQLCommunity plug in. Under RealBasic 2012 2.1 (using the plug in shipped with that version) a typical query and retrieve of data (from a separate server on the same local network) takes c. 10 msec. However, running exactly the same code compiled under Xojo 4.1 (using the plugin shipped with that version) takes on the order of 100 msec. Interestingly, the exact same code runs without a problem if I run it as a MacOS console application and the same general code when compiled as a desktop application runs at the same speed under Windows and MacOS in Xojo or RealBasic 2012. So it appears to be an issue with the Linux MYSQL plugin.
Overall the database operations are generally 10-20 times slower in the code compiled by Xojo than in RealBasic. I saw a recent thread indicating a similar slow down in the web application builds as well that seemed to end with ‘just code around the issue after all the query time is minimal in a Web App’. However, this appears to be a fundamental performance bug with the MySQL plugin. Has anyone else seen this or are there any ideas of what I might be doing that the new MySQL plug in doesn’t like?
[code]
Etime=Microseconds()
Rs = navdb.SQLSelect(“SELECT Ident,Latitude,Lon,State,URN,Zref FROM waypoints WHERE Ident=’”+one.id+"’ AND Type<>‘DME’ ORDER BY connected DESC")
While not rs.eof
Troute = new route_element
Troute.ID = rs.field(“Ident”).stringvalue
Troute.State = rs.field(“State”).stringvalue
Troute.lat = rs.field(“Latitude”).doublevalue
Troute.lon = rs.field(“Lon”).doublevalue
tRoute.z = rs.Field(“Zref”).IntegerValue
tRoute.URN = rs.Field(“URN”).StringValue
Src.append(troute)
rs.MoveNext
Wend
app.errlog(" loading first array “+format(Microseconds()-Etime,”###,###,##0"))
Etime=Microseconds()[/code]