Merge lp:~ivaldi/midori/tabby-session-import-transaction into lp:midori

Proposed by André Stösel
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6392
Merged at revision: 6393
Proposed branch: lp:~ivaldi/midori/tabby-session-import-transaction
Merge into: lp:midori
Diff against target: 25 lines (+7/-1)
1 file modified
extensions/tabby.vala (+7/-1)
To merge this branch: bzr merge lp:~ivaldi/midori/tabby-session-import-transaction
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+184545@code.launchpad.net

Commit message

Speed up session import

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/tabby.vala'
2--- extensions/tabby.vala 2013-09-07 14:10:12 +0000
3+++ extensions/tabby.vala 2013-09-09 11:52:26 +0000
4@@ -55,7 +55,7 @@
5 }
6 }
7
8- public void import_session (Katze.Array tabs) {
9+ public virtual void import_session (Katze.Array tabs) {
10 Session session = this.get_new_session ();
11 GLib.List<unowned Katze.Item> items = tabs.get_items ();
12 foreach (Katze.Item item in items) {
13@@ -309,6 +309,12 @@
14 return sessions;
15 }
16
17+ public override void import_session (Katze.Array tabs) {
18+ this.db.exec ("BEGIN;");
19+ base.import_session(tabs);
20+ this.db.exec("COMMIT;");
21+ }
22+
23 public override Base.Session get_new_session () {
24 return new Session (this.db) as Base.Session;
25 }

Subscribers

People subscribed via source and target branches

to all changes: