Tyler Schultz's blog



Tyler SchultzTyler Schultz
Standup 09/30/2011: Bulk inserts
edit Posted by Tyler Schultz on Friday September 30, 2011 at 09:39AM

Ask for Help

"Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!"

It doesn't answer why your job is using so much memory, but check out activerecord-import.

Tyler SchultzTyler Schultz
Standup 09/28/2011: Epics!
edit Posted by Tyler Schultz on Wednesday September 28, 2011 at 09:10AM

Interesting Things

  • Pivotal SF will be hosting a Tracker Users Group meetup tonight. Dan Podsedly will be speaking. He will be seeking feedback for a eagerly awaited feature to be rolled out shortly: Epics! Come and mingle with fellow Tracker users, drink some beer and eat some food.

Tyler SchultzTyler Schultz
Android WebView loadData vs loadDataWithBaseURL
edit Posted by Tyler Schultz on Saturday September 10, 2011 at 10:52AM

We spent some time trying to figure out why some html content would not load in our app's WebView. We found trivial html can be loaded into a WebView using the loadData(String, String, String) method. Rendering complex pages with Javascript is a problem. It turns out the loadData() method requires the html to be URI escaped (RTFM? Bah!). There are additional characters that need to be escaped too, requiring some nasty boilerplate.

The simpler solution (workaround?) is to use loadDataWithBaseURL(String, String, String, String, String). Calls to this method do not require escaping. Pass along a garbage base url (or null), and an empty or null history url for success and profit.

webView.loadDataWithBaseURL("blarg://ignored", getData(), "text/html", "utf-8", "");