Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse subjects by delimiter for #2627 #2633

Merged
merged 2 commits into from
Jul 12, 2021

Conversation

benwbrum
Copy link
Owner

Implements #2627

@benwbrum benwbrum linked an issue Jun 15, 2021 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Jun 15, 2021

Coverage Status

Coverage increased (+0.1%) to 80.777% when pulling c6b3ed3 on 2627-parse-subject-hierarchies into 35e1dd0 on development.

@saracarl
Copy link
Collaborator

I don't know if this is a problem or not, but it might be:

<category xml:id="C262">
<catDesc>Activities</catDesc>
<category xml:id="C263">
<catDesc>Agricultural</catDesc>
<category xml:id="S55234">
<catDesc>
<term>hauling oats</term>
<note type="categorization">
Categories:
<ab>
<ptr ana="#category #root" target="#C262">Activities</ptr>
--
<ptr ana="#category #leaf" target="#C263">Agricultural</ptr>
</ab>
</note>

Specifically the -- between ptr tags.

@saracarl
Copy link
Collaborator

Exporting a ~200 page TEI document is taking forever. Is this new with this PR or not, I'm not sure.

 CACHE Page Load (0.0ms)  SELECT `pages`.* FROM `pages` WHERE `pages`.`work_id` = 14649 ORDER BY position
  ↳ app/views/export/tei.html.erb:284
  CACHE Note Load (0.0ms)  SELECT `notes`.* FROM `notes` WHERE `notes`.`page_id` IN (504373, 504374, 504375, 504376, 504377, 504378, 504379, 504380, 504381, 504382, 504383, 504384, 504385, 504386, 504387, 504388, 504389, 504390, 504391, 504392, 504393, 504394, 504395, 504396, 504397, 504398, 504399, 504400, 504401, 504402, 504403, 504404, 504405, 504406, 504407, 504408, 504409, 504410, 504411, 504412, 504413, 504414, 504415, 504416, 504417, 504418, 504419, 504420, 504421, 504422, 504423, 504424, 504425, 504426, 504427, 504428, 504429, 504430, 504431, 504432, 504433, 504434, 504435, 504436, 504437, 504438, 504439, 504440, 504441, 504442, 504443, 504444, 504445, 504446, 504447, 504448, 504449, 504450, 504451, 504452, 504453, 504454, 504455, 504456, 504457, 504458, 504459, 504460, 504461, 504462, 504463, 504464, 504465, 504466, 504467, 504468, 504469, 504470, 504471, 504472, 504473, 504474, 504475, 504476, 504477, 504478, 504479, 504480, 504481, 504482, 504483, 504484, 504485, 504486, 504487, 504488, 504489, 504490, 504491, 504492, 504493, 504494, 504495, 504496, 504497, 504498, 504499, 504500, 504501, 504502, 504503, 504504, 504505, 504506, 504507, 504508, 504509, 504510, 504511, 504512, 504513, 504514, 504515, 504516, 504517, 504518, 504519, 504520, 504521, 504522, 504523, 504524, 504525, 504526, 504527, 504528, 504529, 504530, 504531, 504532, 504533, 504534, 504535, 504536, 504537, 504538, 504539, 504540, 504541, 504542, 504543, 504544, 504545, 504546, 504547, 504548, 504549, 504550, 504551, 504552, 504553, 504554, 504555, 504556, 504557, 504558, 504559, 504560, 504561, 504562, 504563, 504564, 504565, 504566) ORDER BY created_at
  ↳ app/views/export/tei.html.erb:284
  CACHE IaLeaf Load (0.0ms)  SELECT `ia_leaves`.* FROM `ia_leaves` WHERE `ia_leaves`.`page_id` IN (504373, 504374, 504375, 504376, 504377, 504378, 504379, 504380, 504381, 504382, 504383, 504384, 504385, 504386, 504387, 504388, 504389, 504390, 504391, 504392, 504393, 504394, 504395, 504396, 504397, 504398, 504399, 504400, 504401, 504402, 504403, 504404, 504405, 504406, 504407, 504408, 504409, 504410, 504411, 504412, 504413, 504414, 504415, 504416, 504417, 504418, 504419, 504420, 504421, 504422, 504423, 504424, 504425, 504426, 504427, 504428, 504429, 504430, 504431, 504432, 504433, 504434, 504435, 504436, 504437, 504438, 504439, 504440, 504441, 504442, 504443, 504444, 504445, 504446, 504447, 504448, 504449, 504450, 504451, 504452, 504453, 504454, 504455, 504456, 504457, 504458, 504459, 504460, 504461, 504462, 504463, 504464, 504465, 504466, 504467, 504468, 504469, 504470, 504471, 504472, 504473, 504474, 504475, 504476, 504477, 504478, 504479, 504480, 504481, 504482, 504483, 504484, 504485, 504486, 504487, 504488, 504489, 504490, 504491, 504492, 504493, 504494, 504495, 504496, 504497, 504498, 504499, 504500, 504501, 504502, 504503, 504504, 504505, 504506, 504507, 504508, 504509, 504510, 504511, 504512, 504513, 504514, 504515, 504516, 504517, 504518, 504519, 504520, 504521, 504522, 504523, 504524, 504525, 504526, 504527, 504528, 504529, 504530, 504531, 504532, 504533, 504534, 504535, 504536, 504537, 504538, 504539, 504540, 504541, 504542, 504543, 504544, 504545, 504546, 504547, 504548, 504549, 504550, 504551, 504552, 504553, 504554, 504555, 504556, 504557, 504558, 504559, 504560, 504561, 504562, 504563, 504564, 504565, 504566)
  ↳ app/views/export/tei.html.erb:284
  CACHE ScCanvas Load (0.0ms)  SELECT `sc_canvases`.* FROM `sc_canvases` WHERE `sc_canvases`.`page_id` IN (504373, 504374, 504375, 504376, 504377, 504378, 504379, 504380, 504381, 504382, 504383, 504384, 504385, 504386, 504387, 504388, 504389, 504390, 504391, 504392, 504393, 504394, 504395, 504396, 504397, 504398, 504399, 504400, 504401, 504402, 504403, 504404, 504405, 504406, 504407, 504408, 504409, 504410, 504411, 504412, 504413, 504414, 504415, 504416, 504417, 504418, 504419, 504420, 504421, 504422, 504423, 504424, 504425, 504426, 504427, 504428, 504429, 504430, 504431, 504432, 504433, 504434, 504435, 504436, 504437, 504438, 504439, 504440, 504441, 504442, 504443, 504444, 504445, 504446, 504447, 504448, 504449, 504450, 504451, 504452, 504453, 504454, 504455, 504456, 504457, 504458, 504459, 504460, 504461, 504462, 504463, 504464, 504465, 504466, 504467, 504468, 504469, 504470, 504471, 504472, 504473, 504474, 504475, 504476, 504477, 504478, 504479, 504480, 504481, 504482, 504483, 504484, 504485, 504486, 504487, 504488, 504489, 504490, 504491, 504492, 504493, 504494, 504495, 504496, 504497, 504498, 504499, 504500, 504501, 504502, 504503, 504504, 504505, 504506, 504507, 504508, 504509, 504510, 504511, 504512, 504513, 504514, 504515, 504516, 504517, 504518, 504519, 504520, 504521, 504522, 504523, 504524, 504525, 504526, 504527, 504528, 504529, 504530, 504531, 504532, 504533, 504534, 504535, 504536, 504537, 504538, 504539, 504540, 504541, 504542, 504543, 504544, 504545, 504546, 504547, 504548, 504549, 504550, 504551, 504552, 504553, 504554, 504555, 504556, 504557, 504558, 504559, 504560, 504561, 504562, 504563, 504564, 504565, 504566)
  ↳ app/views/export/tei.html.erb:284

@benwbrum
Copy link
Owner Author

Running a 200pg export from this branch takes 3.2 minutes
Running the same export from development takes 2.9 minutes

@benwbrum
Copy link
Owner Author

The -- characters between pointer tags are intentional, and not introduced by this PR.

@saracarl saracarl merged commit eba9562 into development Jul 12, 2021
@saracarl saracarl deleted the 2627-parse-subject-hierarchies branch July 12, 2021 13:58
sylvieed pushed a commit that referenced this pull request Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hierarchical Subject Exports.  
3 participants