Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Inserting and Removing combobox items 5 years 7 months ago #14069

  • grudan
  • grudan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 1
  • Thank you received: 0
What would be the best way to improve performance on inserting and removing combobox items?
Adding 50 items takes about 14 seconds, and removing 50 items takes about the same amount of time.

The device for testing is an LG VK810 tablet.

The code below is being run after the PDF is rendered in order to be able to correctly find the combobox annotation.

for (int i=0;i<50;i++) {
annot.InsertComboItem(0, "test1", "test1");
}

for (int i=0;i<50;i++) {
annot.RemoveComboItem(0);
}

Please Log in or Create an account to join the conversation.

Inserting and Removing combobox items 5 years 7 months ago #14072

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 692
  • Thank you received: 59
A better approach shall be to append/remove the item on the last position

for (int i=0;i<50;i++) {
annot.InsertComboItem(i, "test1", "test1");
}

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum