Fix bug #20910.
authorBen Pfaff <blp@gnu.org>
Wed, 19 Sep 2007 04:28:59 +0000 (04:28 +0000)
committerBen Pfaff <blp@gnu.org>
Wed, 19 Sep 2007 04:28:59 +0000 (04:28 +0000)
commit2bdde1cd21cd58349cf4bd852fddf40524854288
treebf22a42051b81ea0db1dd0e6dc826bcfe742bb46
parentb5a51d1c0bc3eda065002dd505cade85f4d75514
Fix bug #20910.

* helper.c (create_casereader_from_data_store): New function.
(execute_syntax): Only replace the active file data by a new
casereader if syntax caused the active file to be read, to avoid
exponential slowdown as an increasing number of snippets that do
not read from the active file are consecutively executed.  Bug
#20910.  Reviewed by and heavily influenced by John Darrington.

* psppire-data-store.c (psppire_data_store_get_value_count): New
function.

* psppire-dict.c (psppire_dict_get_value_cnt): New function.

* procedure.c (proc_extract_active_file_data): New function.

* lazy-casereader.h: New file.

* lazy-casereader.c: New file.

* casereader.c (casereader_dynamic_cast): New function.
14 files changed:
src/data/ChangeLog
src/data/automake.mk
src/data/casereader-provider.h
src/data/casereader.c
src/data/lazy-casereader.c [new file with mode: 0644]
src/data/lazy-casereader.h [new file with mode: 0644]
src/data/procedure.c
src/data/procedure.h
src/ui/gui/ChangeLog
src/ui/gui/helper.c
src/ui/gui/psppire-data-store.c
src/ui/gui/psppire-data-store.h
src/ui/gui/psppire-dict.c
src/ui/gui/psppire-dict.h