Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String.Substring is very slow and floods garbage collector #183

Open
GoogleCodeExporter opened this issue Jun 24, 2015 · 3 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Execute some long queries or create table statements while profiling the 
memory and notice that it is extreme bloat
2.
3.

What is the expected output? What do you see instead?
In my examples I am loading a database file that is ~50kb extremely small file. 
Just doing and select * from ... on all the tables i end up using ~5mb of 
memory that is nearly 100 times larger than the actual size of the database.

Sure there is overhead but calling Substring while parsing a long query is 
going to create n-1 new strings. The C code uses simple pointer arithmetic to 
no copy the data so much. Is it possible to use char[] and indexes instead of 
string.substring? 


What version of the product are you using? On what operating system?
3.7

Please provide any additional information below.

I absolutely love the framework but would love for it to be lighter. We are 
using it with Unity and it works great thanks.

Original issue reported on code.google.com by [email protected] on 8 Feb 2014 at 5:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant