#include <gtk/gtk.h>

int
main (int argc, char *argv[])
{
  GtkTextBuffer *buffer;
  GtkTextIter iter;
  GTimer *timer;
  gchar *contents;
  gsize length;

  gtk_init (&argc, &argv);

  buffer = gtk_text_buffer_new (NULL);
  gtk_text_buffer_get_start_iter (buffer, &iter);

  g_file_get_contents ("./big-file", &contents, &length, NULL);

  timer = g_timer_new ();
  gtk_text_buffer_insert (buffer, &iter, contents, length);
  g_timer_stop (timer);

  g_message ("Elapsed time: %lf", g_timer_elapsed (timer, NULL));
  g_timer_destroy (timer);

  return 0;
}
