drizzle
Profile
Search
 
Powered by SoftLayer
GSOC List Replacement

This is the workspace for Nathan Williams, who is working on the Google Summer of Code project to refactor and the custom List<> implementation with the STL's list, vector, and queue for Drizzle. Monty Taylor is mentoring Nathan.

Contents

Overall Project Goals

Identify Usage Locations and Patterns in Existing Kernel

Before we can begin refactoring, it's essential to get a documented list of the locations of where the custom List, I_List, List_iterator, and List_iterator_fast classes are used in the codebase. Once these locations are identified, we must figure out which of the STL's standard template containers, if any, are appropriate replacements. Each container has different usage and efficiency patterns, and therefore it is important to understand the existing usage patterns in order to properly pick a replacement from the standard library.

Performance Considerations

In order to measure any impact on performance, similar to what we saw with a regression on the STL bitset replacement, it is first necessary to have a baseline set of benchmarks at varying concurrency levels. Post bitset replacement, there is now a staging tree where an automated suite suite is run before any merges into the trunk. This project is container refactoring only with no new logic. This allows for small code changes with fast iterations cycles and, perhaps most importantly, small merges. I expect some regression to be seen as more areas of use are switched to standard containers due to the current implementations being intrusive and utilizing pool allocators. The harm or benefit of those facts will be seen once work is underway. When the project attacks is overall memory management strategy, those potential hits can be remedied with custom allocators.

Replace Major Custom List Class Implementations

For the major pieces identified above, refactor the kernel to use the STL's replacement container classes. Break this into multiple steps once they are identified above.


Time line and Deliverables

List and I_List Usage Analysis

Small Contribution

Iteration Cycle One

Iteration Cycle Two

Final Review


Research

Prior Work

Replace-LIST - RedBrain's work earlier this year on tackling the list templates

Launchpad Blueprint


list_node


base_list


base_list_iterator


List


List_iterator


List_iterator_fast


ilink


base_ilist


base_ilist_iterator


I_List


I_List_iterator


Current Usage

I_List

I_List<NAMED_LIST> key_caches
  drizzled/drizzled.cc:364    (definition)
  drizzled/set_var.cc:75       (extern)

I_List<thread_info> thread_infos
  drizzled/show.cc:997  (local variable)

List

Foreign_key::ref_colums
  List<Key_part_spec> ref_columns;
  drizzled/foreign_key.h:53

Item_cond::list
  List<Item> list;
  drizzled/item/cmpfunc.h:1413 

Item_equal::fields
  List<Item_field> fields;
  drizzled/item/cmpfunc.h:1538 

COND_EQUAL::current_level
  List<Item_equal> current_level;
  drizzled/item/cmpfunc.h:1579 

Key::columns
  List<Key_part_spec> columns
  drizzled/key.h:39

multi_update::fields, values
 List <Item> *fields, *values
 drizzled/multi_update.h:35

multi_update::fields_for_table, values_for_table
  List <Item> **fields_for_table, **values_for_table
  drizzled/multi_update.h:36 

multi_update::unupdated_check_opt_tables
  List <Table> unupdated_check_opt_tables;
  drizzled/multi_update.h:42

nested_join_st::join_list
  List<TableList> join_list;
  drizzled/nested_join.h:31 

nested_join_st::sj_outer_expr_list
  List<Item> sj_outer_expr_list;
  drizzled/nested_join.h:62 

QUICK_INDEX_MERGE_SELECT::quick_selects
  List<QUICK_RANGE_SELECT> quick_selects;
  drizzled/opt_range.h:459 

QUICK_ROR_INTERSECT_SELECT::quick_selects
  List<QUICK_RANGE_SELECT> quick_selects;
  drizzled/opt_range.h:518 

QUICK_ROR_UNION_SELECT::quick_selects
  List<QUICK_SELECT_I> quick_selects;
  drizzled/opt_range.h:573 

QUICK_GROUP_MIN_MAX_SELECT::min_functions
QUICK_GROUP_MIN_MAX_SELECT::max_functions
  List<Item_sum> *min_functions, *max_functions
  drizzled/opt_range.h:645

QUICK_SELECT_DESC
  List<QUICK_RANGE> rev_ranges;
  drizzled/opt_range.h:698 
  
select_insert::fields
  List<Item> *fields;
  drizzled/select_insert.h:28 

st_copy_info::update_fiels, update_values
  List<Item> *update_fields, *update_valus
  drizzled/session.h:82 ;

Session::warn_list    
  List <DRIZZLE_ERROR> warn_list;
  drizzled/session.h:721 

std_add_scheme_table::files
  List<LEX_STRING> *files;
  drizzled/show.cc:1977 
  
Select_Lex_Unit::item_list
  List<Item> item_list;
  drizzled/sql_lex.h:323 

Select_Lex_Unit::types
  List<Item> types
  drizzled/sql_lex.h:335 

Select_Lex::item_list
  drizzled/sql_lex.h:418 List<Item> item_list;
  
Select_Lex::interval_list
  List<String> interval_list;
  drizzled/sql_lex.h:419 

Select_Lex::top_join_list
  List<TableList> top_join_list;
  drizzled/sql_lex.h:422 

Select_Lex::join_list
  List<TableList> *join_list;
  drizzled/sql_lex.h:423 

Select_Lex::sj_nests
  List<TableList> sj_nests;
  drizzled/sql_lex.h:425  

Select_Lex::inner_refs_list
  List<Item_outer_ref> inner_refs_list;
  drizzled/sql_lex.h:467 

Select_Lex::non_agg_fields
  List<Item_field> non_agg_fields;
  drizzled/sql_lex.h:485 

Select_Lex::prev_join_using
  List<String> * prev_join_using;
  drizzled/sql_lex.h:502 

Select_Lex::index_hints
  List<Index_hint> *index_hints;
  drizzled/sql_lex.h:631 

Alter_Info::drop_list
  List<Alter_drop> drop_list;
  drizzled/sql_lex.h:671 
    
Alter_Info::alter_list
  List<Alter_column> alter_list;
  drizzled/sql_lex.h:672 
    
Alter_Info::key_list
  List<Key> key_list;
  drizzled/sql_lex.h:673 
    
Alter_Info::create_list
  List<Create_field> create_list;
  drizzled/sql_lex.h:674

LEX::col_list
  List<Key_part_spec> col_list;
  drizzled/sql_lex.h:864

LEX::ref_;ost
  List<Key_part_spec> ref_list;
  drizzled/sql_lex.h:865 

LEX::interval_list
  List<String> interval_list;
  drizzled/sql_lex.h:866

LEX::columns
  List<Lex_Column> columns;
  drizzled/sql_lex.h:867 

LEX::insert_list, field_list, value_list, update_list
  List<Item> *insert_list,field_list,value_list,update_list;
  drizzled/sql_lex.h:868

LEX::many_values
  List<List_item> many_values;
  drizzled/sql_lex.h:869 

LEX::var_list
  List<set_var_base> var_list;
  drizzled/sql_lex.h:870

LEX::param_list
  List<Item_param> param_list;
  drizzled/sql_lex.h:871

LEX::context_stack
  List<Name_resolution_context> context_stack;
  drizzled/sql_lex.h:885    

st_rollup
  List<Item> *fields;    
  drizzled/sql_select.h:376 
  
JOIN::fields
  List<Item> *fields;
  drizzled/sql_select.h:427 

JOIN::all_fields
  List<Item> all_fields;
  drizzled/sql_select.h:486

JOIN::tmp_all_fields1, tmp_all_fields2, tmp_all_fields3
  List<Item> tmp_all_fields1, tmp_all_fields2, tmp_all_fields3;
  drizzled/sql_select.h:488

JOIN::tmp_fields_list1, tmp_fields_list2, tmp_fields_list3
  List<Item> tmp_fields_list1, tmp_fields_list2, tmp_fields_list3;
  drizzled/sql_select.h:490

JOIN::fields_list
  List<Item> &fields_list;
  drizzled/sql_select.h:491

JOIN::join_list
  List<TableList> *join_list;
  drizzled/sql_select.h:498 

YYSTYPE (union)
  List<Item> *item_list
  List<String> *string_list
  drizzled/sql_yacc.h:948
  drizzled/sql_yacc.cc:1321 

st_foreign_key_info
  List<LEX_STRING> foreign_fields, referenced_fields;
  drizzled/table.h:402 

TableList::join_using_felds
  List<String> *join_using_fields;
  drizzled/table_list.h:145 

TableList::join_columns
  List<Natural_join_column> *join_columns
  drizzled/table_list.h:150 

TableList::index_hints
  List<Index_hint> *index_hints
  drizzled/table_list.h:161

TableList::join_list
  List<TableList> *join_list;
  drizzled/table_list.h:197
Site generously hosted by SoftLayer Technologies