{"action":"created","issue":{"url":"https://api.github.com/repos/sequelpro/sequelpro/issues/687","repository_url":"https://api.github.com/repos/sequelpro/sequelpro","labels_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/687/labels{/name}","comments_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/687/comments","events_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/687/events","html_url":"https://github.com/sequelpro/sequelpro/issues/687","id":22378361,"number":687,"title":"Issues with large queries in query history","user":{"login":"sequelpro","id":863151,"avatar_url":"https://avatars.githubusercontent.com/u/863151?v=3","gravatar_id":"","url":"https://api.github.com/users/sequelpro","html_url":"https://github.com/sequelpro","followers_url":"https://api.github.com/users/sequelpro/followers","following_url":"https://api.github.com/users/sequelpro/following{/other_user}","gists_url":"https://api.github.com/users/sequelpro/gists{/gist_id}","starred_url":"https://api.github.com/users/sequelpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sequelpro/subscriptions","organizations_url":"https://api.github.com/users/sequelpro/orgs","repos_url":"https://api.github.com/users/sequelpro/repos","events_url":"https://api.github.com/users/sequelpro/events{/privacy}","received_events_url":"https://api.github.com/users/sequelpro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sequelpro/sequelpro/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/sequelpro/sequelpro/labels/Priority-Medium","name":"Priority-Medium","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2013-11-09T04:04:07Z","updated_at":"2016-06-16T20:04:55Z","closed_at":null,"body":"Issue imported from Google Code: https://code.google.com/p/sequel-pro/issues/detail?id=687\nReporter:netz%bar...@gtempaccount.com Date:2010-05-16 03:42:13 Status:Accepted\n\n<b>What steps will reproduce the problem?</b>\n1/ just start Sequel Pro\n\n<b>What is the expected output? What do you see instead?</b>\nRight after start it uses 460 MB of RAM, after one minute ~1GB up to 1.5 GB. \n\n<b>What version of Sequel Pro are you using? What version of MySQL are you</b>\n<b>connecting to on the server?</b>\nSequel Pro 0.98 and MySQL 5.0.41 (@MAMP)\n\n<b>Please provide any additional information below.</b>\nI didn't have this issue with earlier versions of Sequel Pro. I am running Snow Leopard 10.6.3.\n\nPlease tell me if you need further information."},"comment":{"url":"https://api.github.com/repos/sequelpro/sequelpro/issues/comments/226597759","html_url":"https://github.com/sequelpro/sequelpro/issues/687#issuecomment-226597759","issue_url":"https://api.github.com/repos/sequelpro/sequelpro/issues/687","id":226597759,"user":{"login":"abhibeckert","id":266088,"avatar_url":"https://avatars.githubusercontent.com/u/266088?v=3","gravatar_id":"","url":"https://api.github.com/users/abhibeckert","html_url":"https://github.com/abhibeckert","followers_url":"https://api.github.com/users/abhibeckert/followers","following_url":"https://api.github.com/users/abhibeckert/following{/other_user}","gists_url":"https://api.github.com/users/abhibeckert/gists{/gist_id}","starred_url":"https://api.github.com/users/abhibeckert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhibeckert/subscriptions","organizations_url":"https://api.github.com/users/abhibeckert/orgs","repos_url":"https://api.github.com/users/abhibeckert/repos","events_url":"https://api.github.com/users/abhibeckert/events{/privacy}","received_events_url":"https://api.github.com/users/abhibeckert/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T20:04:55Z","updated_at":"2016-06-16T20:04:55Z","body":"We'll fix this by having one file per query and only reading the whole file when you try to insert a saved query.\r\n\r\nBiggest bottleneck would be NSString UTF8 decoding, which chokes on huge strings (several orders of magnitude slower than reading the data from disk).\r\n\r\nBest is to read the first ~1000 bytes, check if you're inside a multi byte character (`char > 128 == true` I think), then move backwards byte by byte until you're not.\r\n\r\nI think `NSFileHandle readDataOfLength:` is more appropriate than mmap, at least for creating the `NSMenuItem`."}}
{"actor":{"display_login":"abhibeckert"}}